As I understand ngComponentRouter (ngNewRouter) has been deprecated. And I didn't find any other alternatives but ngRoute & ui-router, which are obviously not designed to work with components.
Asked
Active
Viewed 180 times
1 Answers
0
This is a pretty old question, but at that time as an alternative, the most popular was ngrx/router.
At the current point, Angular2 was released with its own router.
UPDATE
AngularJS ui-router component based approach:
export function routeConfig($stateProvider: ng.ui.IStateProvider): void {
$stateProvider
.state('app.details', {
url: '/app/details',
template: '<app-details></app-details>'
})
.state('app.item', {
url: '/app/item',
template: '<app-item></app-item>'
})
.state('app.error', {
url: '/app/error',
template: '<error></error>'
})
}

Kanso Code
- 7,479
- 5
- 34
- 49
-
The question is still actual. – mrded Sep 28 '16 at 08:56
-
So check last link in my answer – Kanso Code Sep 28 '16 at 09:14
-
@mrded, yes, it was rewritten and works with components :) – Kanso Code Sep 28 '16 at 11:38
-
Unfortunately, component router in AngularJS is still messy, so we are currently using TypeScript + AngularJS, and still `ui-router` with a specific component based implementation. Updated my answer. – Kanso Code Sep 28 '16 at 13:05