MD Ghouse MD Ghouse - 1 month ago 25
AngularJS Question

Uncaught ReferenceError: app is not defined(…) but its loading data

Here I have 3 javascript files.

Module.Js

var app = angular.module('MyApp', ['angularUtils.directives.dirPagination', 'ngRoute'])


Controller.Js

app.controller('MyCntrlFun', function ($scope, MyServices)


Service.Js

app.service('MyServices', function ($http)


Htmlcode

<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>


its roughing me an error as Uncaught Error but its display data but when i try to defining Pagination data is not loading...please help me why this problem is occurring

Answer

Check ur

 <tr dir-paginate="item in items>