client/app/search/search_controller.js
changeset 6 4be9f21f2df1
parent 2 36ccc573af9a
child 7 e70f1c4785f3
--- a/client/app/search/search_controller.js	Fri Oct 03 17:04:28 2014 +0200
+++ b/client/app/search/search_controller.js	Mon Oct 06 12:59:13 2014 +0200
@@ -15,6 +15,10 @@
       searchApi.searchResource({q:$scope.q, of: 'json', synthesis: 'false', nresults:'50', callback: 'JSON_CALLBACK'}).$promise.then(
           //success
           function( data ){
+              // TEMP : add random pict
+              for(var i=data.hits.length-1; i>=0; i--){
+                  data.hits[i].url = 'http://placekitten.com/g/' + (100+Math.floor((Math.random()*600)+1)) + '/' + (100+Math.floor((Math.random()*600)+1));
+              }
               $scope.results = data;
           },
           //error