client/app/search/search_controller.js
changeset 197 8b87432acffc
parent 188 fd75c66c8e30
child 201 5f54f408cc44
--- a/client/app/search/search_controller.js	Wed Dec 02 11:41:53 2015 +0100
+++ b/client/app/search/search_controller.js	Wed Dec 02 18:07:42 2015 +0100
@@ -12,9 +12,9 @@
     .controller('searchCtrl', function($scope, $location, $routeParams, searchApi, $modal, Slide){
         $scope.q = $routeParams.q || '';
         if ($scope.q !== ''){
-            $scope.results_ = searchApi.searchResource({q:$scope.q, of: 'json', synthesis: 'false', nresults:'10', callback: 'JSON_CALLBACK'}).getJsonp();
+          $scope.results = searchApi.searchResource({q:$scope.q, of: 'json', synthesis: 'false', nresults:'10', callback: 'JSON_CALLBACK'}).getJsonp();
         }
-        
+
         $scope.toggleModal = function (index) {
 
             var modalInstance = $modal.open({
@@ -34,7 +34,7 @@
     })
     .controller('ModalInstanceCtrl', function ($scope, $modalInstance, Book) {
         $scope.books = Book.query({format:'json'});
-        
+
         $scope.addToBook = function(idBook){
             $modalInstance.close(idBook);
         };