I have an ng application and ng-view. The application has several controllers.
From the outside, angular, legacy JS code, I would like to redirect a specific controller.
var e = document.getElementById('mApp'); var scope = angular.element(e).scope(); scope.$apply(function() { scope.$location.path("/account/login"); });
I tried $ scope. $ location, and he told me that $ location is undefined, so I have to do something wrong.
source share