I am working on a web site with Angularjs as my client side platform. I am trying to do what has to be easy and straight forward to do, but for some reason does not work at this time. The code for redirecting is:
$urlRouterProvider
.when('/notifications', '/notifications/items');
$urlRouterProvider
.when('/notifications/items', '/notifications/items/list');
but it does not work and I end up with the following url:
http://mydomain/#/notifications
here are the states I am using here:
$stateProvider
.state('notifications', {
url: '/notifications',
template: '<notifications-layout></notifications-layout>',
data: {
requiredPermission: 'notifications',
icon: 'suitcase',
title: 'send notifications'
}
})
.state('notifications.items', {
url: '/items',
data: {
title: 'notifications
},
template: '<ui-view></ui-view>'
})
.state('notifications.items.list', {
url: '/list',
data: {
title: 'notifications
},
template: '<notifications-items></notifications-items>'
})
I would love to know what am I missing , perhaps someone ran into this issue before?