Skip to content

Commit

Permalink
feature(controllers) prevent from shifting input
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed May 14, 2014
1 parent 65c6043 commit d4eebfa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ angular.module('myApp.controllers', [])
}
}
$scope.search = function() {
angular.element('.loader').fadeIn(1000);
angular.element('.loader').fadeTo(1000, 1)
$.get('https://www.googleapis.com/scribe/v1/research?key=AIzaSyDqVYORLCUXxSv7zneerIgC2UYMnxvPeqQ&dataset=dictionary&dictionaryLanguage=en&query='+$scope.word, function(data) {
console.log(data);
angular.element('.loader').fadeOut(1000);
angular.element('.loader').fadeTo(1000, 0)
// console.log(data.data[0].dictionary.definitionData);
$scope.definitions = data.data[0].dictionary.definitionData;
$scope.$apply();
Expand All @@ -117,7 +117,7 @@ angular.module('myApp.controllers', [])
$scope.back = function() {
$location.path('/');
}
angular.element('.loader').hide();
angular.element('.loader').fadeTo(0, 0)
}])

.controller('LoginCtrl', ['$scope', 'loginService', '$location', 'syncData', function($scope, loginService, $location, syncData) {
Expand Down Expand Up @@ -221,4 +221,4 @@ angular.module('myApp.controllers', [])
}
}

}]);
}]);

0 comments on commit d4eebfa

Please sign in to comment.