in angular-new-router, user can specify an alias for a component:
MyController.$routeConfig = [
{ path: '/', component: 'user', as: 'myUser' }
];
and we can activate it :
<a ng-link="myUser">link to user component</a>
<a ng-link="user">link to user component</a>
Is there a way to know which link user clicks by looking at alias in the controller? thanks.
here is latest example and you need to use angular_1_router.js built from angular2 project instead of installing package of angular-new-router (until it is updated) in a new version they use angular 1.5 and fixed it so you can use components() and child routes etc.
http://plnkr.co/edit/N3YP3dKMuljpZ6mWsVBT?p=preview
app.js