Merge: curl: basic Unix domain socket support
[nit.git] / share / nitweb / javascripts / ui.js
index 5327782..e3d13d7 100644 (file)
                        return {
                                restrict: 'E',
                                replace: true,
+                               scope: {},
                                bindToController: {
                                        pagination: '=',
                                        suffix: '=?'
                                controller: function($scope) {
                                        var vm = this;
 
-                                       $scope.$watch('pagination.pagination', function(pagination) {
+                                       $scope.$watch('vm.pagination', function(pagination) {
                                                if(!pagination) return;
                                                vm.computePages(pagination);
                                        })
                                                $scope.$emit('change-page' + suffix, page, limit);
                                        }
                                },
-                               controllerAs: 'pagination',
+                               controllerAs: 'vm',
                                templateUrl: 'directives/ui/pagination.html'
                        };
                })