我的分页工作正常,但问题是脚本会自动从index.html页面删除,可能导致它删除的原因是什么?
你必须使用cdn方式将与此分页实用程序关联的脚本标记添加到index.html
文件中
<script src="https://raw.githubusercontent.com/michaelbromley/angularUtils/master/src/directives/pagination/dirPagination.js"></script>
或者通过在项目目录中指定此插件的本地路径,例如
<script src="bower_components/angularUtils-pagination/dirPagination.js"></script>
(其中bower_components / angularUtils-pagination / dirPagination.js是我项目目录中此实用程序文件的路径)