angular / router

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

Named default ng-viewport does not creates correct href for ng-link. Is it mandatory to have atleast one unnamed (default) ng-viewport? #392

Open pranavkaushik9 opened 8 years ago

pranavkaushik9 commented 8 years ago

When I create first (default) viewport as named, the ng-link translates to path "."

If I change this viewport to unnamed, it works fine and creates correct href via ng-link i.e. "./dashboard"

See sample at git URL: https://github.com/pranav-xx/new-router-demo If I change make following changes it works fine:

index.html from: <div ng-viewport="mydefault"></div> to: <div ng-viewport></div>

and in app.js from : $router.config([ { "path": "/dashboard", "components": { "mydefault":"dashboard", "urdefault":"pipeline" } } ]);

to: $router.config([ { "path": "/dashboard", "components": { "default":"dashboard", "urdefault":"pipeline" } } ]);