I am getting this error in the console $q is not defined. When I did some research I found some thing like .q library has been deprecated from http://
$q is not defined
.q library has been deprecated
# in your console, try following code $injector = angular.injector(['ng']); q = $injector.get('$q'); deferred = q.defer(); # then do whatever you want