1

I have the following plnkr:

http://plnkr.co/edit/9SjDSb5AjKwXNRGRrpdO?p=preview

If i remove the initialized vars:

Line 72: $scope.totalItems = 0;
Line 73: $scope.currentPage = 1;

My Controller uses a service and from the response i want to update the angular ui bootstrap pagination directive. This doesn't work until i remove the both lines above.

MadeOfSport
  • 513
  • 1
  • 7
  • 19

1 Answers1

1

You are missing the execution of the $scope.search function at the end of the controller:

Line95: $scope.search();

http://plnkr.co/edit/QIuuxvU02FT00riiKPf2?p=preview

The "init" function is just another function in the scope, is not being executed at start of the controller.

fernandopasik
  • 9,565
  • 7
  • 48
  • 55