down votefavorite 
<http://stackoverflow.com/questions/40214157/angularjs-ui-router-needs-to-load-child-state-by-default-similar-to-home-page#>

I am using angularjs ui router and I need to load the child state by 
default (i.e., 'dashboardParent.dashboard').

$stateProvider.state('dashboardParent', {
        abstract: true,
        url: '/dashboard',
        templateUrl: 'app/views/dashboard/dashboard-parent.html',
        controller: 'DashboardParentController'
    }).state('dashboardParent.dashboard', {
        url: '/',
        templateUrl: 'app/views/dashboard/dashboard.html',
        controller: 'DashboardController'
    })

Generally what we do is we have home state with url ("/") from there we 
navigate to some other state let say 'dashboardParent.dashboard'. But here 
I don't have any home state. When I start the application I want 
dashboardParent.dashboard state to be loaded. How to achieve it.

If I add another state home and provide a link to navigate to the state 
'dashboardParent.dashboard' it is loading fine. But my requirement is I do 
not have any home state, instead I need to load 'dashboardParent.dashboard' by 
default. How to achieve it?

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to