Commit 017c0f72 by dileep8014

Merge pull request #6 from MPR-Global/HDPDGI-34-1

solving merge issues
parents 41c81145 6740d6bb
...@@ -25,7 +25,8 @@ angular.module('dgc.home.routes', []).config(['$stateProvider', ...@@ -25,7 +25,8 @@ angular.module('dgc.home.routes', []).config(['$stateProvider',
// states for my app // states for my app
$stateProvider.state('home', { $stateProvider.state('home', {
url: '/search', url: '/search',
templateUrl: '/modules/search/views/search.html' templateUrl: '/modules/search/views/search.html',
controller: 'SearchController'
}); });
} }
]); ]);
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
angular.module('dgc.navigation').controller('NavigationController', ['$scope', 'NavigationResource', angular.module('dgc.navigation').controller('NavigationController', ['$scope', 'NavigationResource',
function($scope, NavigationResource) { function($scope, NavigationResource) {
$scope.leftnav= NavigationResource.get(); $scope.leftnav= NavigationResource.get();
$scope.updateVar = function(event) { $scope.updateVar = function(event) {
$scope.$$prevSibling.query = angular.element(event.target).text(); $scope.$$prevSibling.query = angular.element(event.target).text();
...@@ -29,4 +28,4 @@ angular.module('dgc.navigation').controller('NavigationController', ['$scope', ' ...@@ -29,4 +28,4 @@ angular.module('dgc.navigation').controller('NavigationController', ['$scope', '
}; };
} }
]); ]);
\ No newline at end of file
...@@ -17,4 +17,5 @@ ...@@ -17,4 +17,5 @@
*/ */
'use strict'; 'use strict';
angular.module('dgc.navigation',[]);
angular.module('dgc.navigation',[]);
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
angular.module('dgc.navigation').factory('NavigationResource', ['$resource', function($resource) { angular.module('dgc.navigation').factory('NavigationResource', ['$resource', function($resource) {
return $resource('api/metadata/types?type=TRAIT', {}, { return $resource('api/metadata/types?type=TRAIT', {}, {
get: { get: {
'method': 'GET', 'method': 'GET',
'responseType': 'json', 'responseType': 'json',
'isArray': true, 'isArray': true,
......
...@@ -39,7 +39,6 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio ...@@ -39,7 +39,6 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
NotificationService.reset(); NotificationService.reset();
$scope.limit = 4; $scope.limit = 4;
SearchResource.search({query:query}, function searchSuccess(response) { SearchResource.search({query:query}, function searchSuccess(response) {
$scope.resultCount=response.count; $scope.resultCount=response.count;
$scope.results = response.results; $scope.results = response.results;
$scope.resultRows = $scope.results.rows; $scope.resultRows = $scope.results.rows;
......
...@@ -27,13 +27,9 @@ angular.module('dgc.search').config(['$stateProvider', ...@@ -27,13 +27,9 @@ angular.module('dgc.search').config(['$stateProvider',
templateUrl: '/modules/search/views/search.html', templateUrl: '/modules/search/views/search.html',
controller: 'SearchController' controller: 'SearchController'
}).state('search.results', { }).state('search.results', {
url: '/:query',
templateUrl: '/modules/search/views/searchResult.html',
controller: 'SearchController'
}).state('search.results', {
url: '?query', url: '?query',
templateUrl: '/modules/search/views/searchResult.html', templateUrl: '/modules/search/views/searchResult.html',
controller:'SearchController' controller: 'SearchController'
}); });
} }
]); ]);
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<div data-ng-if="!searchTypesAvailable" data-ng-include="'/modules/search/views/types/guid.html'"></div> <div data-ng-if="!searchTypesAvailable" data-ng-include="'/modules/search/views/types/guid.html'"></div>
</li> </li>
</ul> </ul>
<div ng-show='results.rows.length > 0'> <div ng-show='searchTypesAvailable'>
<pagination total-items="totalItems" items-per-page="itemsPerPage" ng-model="currentPage" ng-change="pageChanged()"></pagination> <pagination total-items="totalItems" items-per-page="itemsPerPage" ng-model="currentPage" ng-change="pageChanged()"></pagination>
<p> <p>
</div> </div>
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