jquery - Error injecting angular $location service -


i need use $location service inside jquery(callback) function, tried following:

$(function(){     ... stuff ...     var $injector = angular.injector(['ng']);     $injector.invoke(function($location){         var url = $location.url();     }); }); 

but uncaught error: [$injector:unpr] logged in console. how can use $location inside jquery callback?


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -