I have the following configuration in my AngularJS App:
angular
.module('MyApp')
.config(['$stateProvider', '$urlRouterProvider', '$locationProvider',
function($stateProvider, $urlRouterProvider, $locationProvider) {
$urlRouterProvider.otherwise('start');
$stateProvider
.state('start', {
url : '/start',
templateUrl : 'views/start.html',
controller : 'AppCtrl'
})
.state('quotation', {
url : '/quotation',
templateUrl : 'views/quotation.html',
controller : 'AppCtrl'
})
.state('loading', {
url : '/loading',
templateUrl : 'views/loading.html'
});
}]);
When the user type http://example.net the "start" view is loaded good http://example.net/#/start, but if the user type directly http://example.net/#/quotation the "quotation" view is loaded and there I have some problems, because the call from start to quotation load some values (via REST API), so .. If the user type directly that view, the loaded was not correct.
How I can avoid direct access to another views?