AngularJS / Changing the URL only when corresponding template's resolve property is solved
Resolve is an interesting property to prevent a template to be displayed regarding some conditional logic dealing with a promise result (solved or rejected). I use it in my application, here's a conceptual sample: .config(['$routeProvider', 'securityAuthorizationProvider', function ($routeProvider, securityAuthorizationProvider) { $routeProvider.when('/test', { templateUrl: '/myCorrespondingView.tpl.html', controller: 'MyCorrespondingCtrl', resolve: securityAuthorizationProvider.requireAuthenticatedUser }); }]) So, this code expects to display /myCorrespondingView.tpl.html content if and only