Commit c8fe5a4a by dileep8014

Update searchController.js

changes for adding spinner
parent b5eaf350
...@@ -35,7 +35,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio ...@@ -35,7 +35,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
$scope.results = []; $scope.results = [];
NotificationService.reset(); NotificationService.reset();
$scope.limit = 4; $scope.limit = 4;
$scope.searchMessage = 'searching...'; $scope.searchMessage = 'load-gif';
$scope.$parent.query = query; $scope.$parent.query = query;
SearchResource.search({ SearchResource.search({
...@@ -67,7 +67,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio ...@@ -67,7 +67,7 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
$scope.$watch('currentPage + itemsPerPage', function() { $scope.$watch('currentPage + itemsPerPage', function() {
var begin = (($scope.currentPage - 1) * $scope.itemsPerPage), var begin = (($scope.currentPage - 1) * $scope.itemsPerPage),
end = begin + $scope.itemsPerPage; end = begin + $scope.itemsPerPage;
if ($scope.transformedResults) $scope.filteredResults = $scope.transformedResults.slice(begin, end); if ($scope.transformedResults)$scope.filteredResults = $scope.transformedResults.slice(begin, end);
$scope.pageCount = function() { $scope.pageCount = function() {
return Math.ceil($scope.resultCount / $scope.itemsPerPage); return Math.ceil($scope.resultCount / $scope.itemsPerPage);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment