Closed omri-shaiko closed 10 years ago
It's just a service, so inject it :-)
function MyCtrl($scope, $navigate) { }
On Mon, Jul 22, 2013 at 12:35 PM, omri-shaiko notifications@github.comwrote:
How can i access the $navigate from outside the html?
Thanks
— Reply to this email directly or view it on GitHubhttps://github.com/ajoslin/angular-mobile-nav/issues/70 .
Thanks, i didn't explain myself properly. How can i use the $navigate from outside angular, for example from the console in chrome dev tools?
My problem is that i have a function inside a script which is not a angular script, and i want to use the $navigate from there..
Thanks again!
angular.injector.get('$navigate').go('/abc'); angular.element(document).scope().$apply();
On Mon, Jul 22, 2013 at 2:11 PM, omri-shaiko notifications@github.comwrote:
Thanks, i didn't explain myself properly. How can i use the $navigate from outside angular, for example from the console in chrome dev tools?
My problem is that i have a function inside a script which is not a angular script, and i want to use the $navigate from there..
Thanks again!
— Reply to this email directly or view it on GitHubhttps://github.com/ajoslin/angular-mobile-nav/issues/70#issuecomment-21363776 .
Are you sure? i'm getting an error. (Tried also in the demo)
Working! thanks!
How can i access the $navigate from outside the html?
Thanks