0

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?

mashta gidi
  • 849
  • 1
  • 10
  • 30

1 Answers1

0

I found my answer at the following link: enter link description here

For some reason, on my current project, the order of the $urlRouterProvider and $stateProvider on app.config is important for the UI Router to work...

mashta gidi
  • 849
  • 1
  • 10
  • 30