[英]Uncaught ReferenceError: app is not defined(…) but its loading data
在這里,我有3個javascript文件。
模塊
var app = angular.module('MyApp', ['angularUtils.directives.dirPagination', 'ngRoute'])
控制器
app.controller('MyCntrlFun', function ($scope, MyServices)
服務
app.service('MyServices', function ($http)
HTML代碼
<table class="table table-bordered" id="Datatab">
<tr>
<th><b>Id</b></th>
<th><b>Name</b></th>
</tr>
<tr dir-paginate="item in items | itemsPerPage: 10" ng-model="search">
<td>{{Accessor.Id}}</td><td>{{Accessor.Name}}</td>
<td>
<button type="button" class="btn btn-success btn-sm" value="Edit" ng-click="EditEmp(Accessor)"><span class="glyphicon glyphicon-pencil"></span></button>
</td>
</tr>
</table>
<dir-pagination-controls max-size="10"
direction-links="true"
boundary-links="true">
</dir-pagination-controls>
它使我粗暴地看到一個錯誤,如“未捕獲的錯誤”,但它顯示了數據,但是當我嘗試定義分頁數據時未加載...請幫助我為什么會出現此問題
檢查你
<tr dir-paginate="item in items>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.