In my app, I require to attach multiple url with same state - how do i achieve this?
here is my existing state:
.state('createCase', {
url: '/createCase',
templateUrl: null,
controller: null,
data: {
requireLogin: false
},
also I would like to attache another url as like this:
.state('createCase', {
url: '/createCase?sn=12345', //(12345 is dynamic )
templateUrl: null,
controller: null,
data: {
requireLogin: false
},
here is my current function:
function routeConfig($stateProvider, $locationProvider, $urlRouterProvider) {
$stateProvider
.state('login', {
url: '/',
templateUrl: function(){
console.log('from 1oauth');
return 'app/login/login.html';
},
controller: 'loginCtrl as ctrl',
data: {
requireLogin: false
}
})
.state('oauth', {
url: '/oauth',
templateUrl: function(){
console.log('from 2oauth');
return 'app/oauth/oauth.template.html';
},
controller: 'OAuthController as ctrl',
data: {
requireLogin: false
}
})
.state('createCase', {
url: '/createCase',
templateUrl: null,
controller: null,
data: {
requireLogin: false
}
}
})
// if (isWeb()){
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
// }
// $urlRouterProvider.otherwise('/');
$urlRouterProvider.otherwise('/');
}