angular / router

The Angular 1 Component Router
MIT License
665 stars 135 forks source link

Controller executing twice on default route #402

Open leena-bhise opened 8 years ago

leena-bhise commented 8 years ago

I am using angular new router for routing on my angular application and my route configuration is :

 $router.config([
       { path: '/', redirectTo: '/dashboard' },
       { path: '/dashboard', component: 'dashboard'},
       { path: '/login', component: 'login' }
    ]);

Here when I access page via "/" then dashboard controller is executing twice even if I change redirectTo with another component (for eg login) then that controller also executes twice.

where would be the issue. Please guide me.

Thanks in advance.