<pagination total-items="totalItems" ng-model="currentPage" max-size="maxSize" class="pagination-sm" boundary-links="true" first-text="‹‹" previous-text="‹" next-text="›" last-text="››" num-pages="numPages">
</pagination>Code hier eingeben...
Show me the code / html that displays the items being paged.
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/zkJe4qlIjXA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
...
<tr ng-repeat="model in list | limitTo: itemsPerPage">
<td><input type="checkbox"></td>
<td>{{model.id | limitTo : 8 }}</td>
<td ng-repeat="column in form | filter : {list: true}">
<span ng-if="column.labelProperty">{{model[column.propertyName][column.labelProperty] | invoke : column.filter : column.filterParam}}</span>
<span ng-if="!column.labelProperty">{{model[column.propertyName] | invoke : column.filter : column.filterParam}}</span>
</td>
</tr>
...
<pagination total-items="totalItems" ng-model="currentPage" class="pagination-sm" boundary-links="true" first-text="‹‹" previous-text="‹" next-text="›" last-text="››" num-pages="numPages" items-per-page="itemsPerPage">
</pagination>
$scope.list = $scope[$scope.resourceType + 's'] = Resource.query();
....
$scope.totalItems = 12; //$scope.list;
$scope.currentPage = 1;
$scope.itemsPerPage = 5;
...
.filter('offset', function() {
return function(input, offset) {
return (input instanceof Array) ? input.slice(+offset) : input;
};
})
Is $scope.list actually an array?
--
var Resource;
Resource = $resource(apiHost + '/:resource/:id', {
id: '@id',
resource: $scope.resourceType + 's'
}, {
update: {method: 'PUT'}
});Code hier eingeben...
You mean its not showing the new one you just added ?
In your browser dev tools console watch the network tab. When you save a new one then go back to the list do you see it request the list from the server again? And does the call result in a status of OK or does is say its using a cached value? Also look at the content of the network call see if the new value is coming back from the server. Need to figure out if its being cached on the client or server side.
Is your application using ngroute?
Resource = $resource(apiHost + '/:resource/:id', {...}