javascript - angularjs想要的打印布局不正确

标签 javascript angularjs

我目前正在使用这个:

<li ng-repeat="items in ferdigheter">{{ items.title}}
<div class="circles">
    <div class="circle" ng-repeat="a in thisnumber(items.stars)"></div>
    <div class="empty_circle" ng-repeat="a in thisnumber(items.maxstars - items.stars)"></div>

</div>
</li>

当我查看正在打印的内容时(ctrl+p),标题在那里,但圆圈/空圆圈不在打印中。知道为什么吗?

我如何确保圆圈也会被打印出来?

当前页面:

enter image description here

当前打印:

enter image description here

想要打印:

enter image description here

更新:

范围:

  $scope.ferdigheter = [
        {tittel: 'Adobe Photoshop', stars: 2, maxstars: 5},
        {tittel: 'CSS/html', stars: 5, maxstars: 5},
        {tittel: 'PHP', stars: 4, maxstars: 5},
        {tittel: 'Angular', stars: 3, maxstars: 5},
        {tittel: 'Javascript', stars: 4, maxstars:5},
        {tittel: 'MS Word', stars: 4, maxstars: 5},
        {tittel: 'Dreamviewer', stars: 2, maxstars: 5},
        {tittel: 'Phpstorm', stars: 4, maxstars: 5},
        {tittel: 'Codeigniter', stars: 5, maxstars: 5},
        {tittel: 'XXX', stars: 3, maxstars: 5},
        {tittel: 'XXX', stars: 5, maxstars: 5},

    ];

作用域thisnumber创建一个数组

最佳答案

用于打印的 CSS 样式可能很棘手。例如,在 Chrome 中,您可能需要使用 -webkit-print-color-调整:exact; 才能正常工作。

在这里查看更完整的答案: https://stackoverflow.com/a/15253634/55154

关于javascript - angularjs想要的打印布局不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39861789/

相关文章:

javascript - 使用 jquery 隐藏和显示元素

javascript - ng-repeat 中的数组未显示

javascript - 使用 jquery 更改文本和类

javascript - 您应该将 vb.net 应用程序专用的 html 文件放在 vb.net 应用程序的哪个文件夹中?

javascript - 即时压缩 css 和 js

javascript - $http AJAX 调用后范围未更新

javascript - 模板中的 Angular 模板

angularjs - Angular : best directive to switch display layout - ng-show?

javascript - 如何使用 $scope 将 json 数据绑定(bind)到 angularJS View ?

javascript - Angular 6 - 为子模块导入共享模块