I'm using ngRoute from AngularJS.
I have the following code:
(...)
$routeProvider
.when('/some-page', {
templateUrl: 'some-page.html',
controller: 'SomeController'
})
(...)
And i want to open /some-page
if a condition (e.g. $scope.isOpenned
) is true. Otherwise, it should redirect to /other-route