The $stateChangeStart or $locationChangeSuccess events are triggered when navigating between site pages. And I would like to catch the event when the user first visits the site and find out the URL. Those. if the user enters into the address bar http://site.ru/user/info , and he does not have access to this directory, then you need to redirect him to the login page. thank
|