angular / router

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

Specify template and controller in route configuration #365

Closed stanleyxu2005 closed 9 years ago

stanleyxu2005 commented 9 years ago

The config syntax is familiar but sightly different to ngroute.

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

The new router seems to follow particular name convention. It will try to instantiate clusterController, masterController. But I do have different policy to name controllers and templates. Even setTemplateMapping and setControllerMapping won't help.

I'd like to know, whether it is possible to use the original angular way to specify the name of template and controller. I think most people who look for a ngroute alternative is because it does not support nested ngviews. So compatible to ngroute will be very helpful.

stanleyxu2005 commented 9 years ago

I close it, as there is no response for 2 weeks. The new router is quite tricky and restricted IMHO. Good luck.