2016-02-26 11:21:31 -05:00
|
|
|
// #docregion
|
2016-05-03 08:06:32 -04:00
|
|
|
import { Component } from '@angular/core';
|
2016-05-11 09:28:58 -04:00
|
|
|
import { RouteConfig, ROUTER_DIRECTIVES } from '@angular/router-deprecated';
|
2016-05-28 10:17:21 -04:00
|
|
|
import { PhoneListComponent } from './phone-list/phone-list.component';
|
|
|
|
import { PhoneDetailComponent } from './phone-detail/phone-detail.component';
|
2016-02-26 11:21:31 -05:00
|
|
|
|
|
|
|
@RouteConfig([
|
2016-05-28 10:17:21 -04:00
|
|
|
{path:'/phones', name: 'Phones', component: PhoneListComponent},
|
|
|
|
{path:'/phones/:phoneId', name: 'Phone', component: PhoneDetailComponent},
|
2016-02-26 11:21:31 -05:00
|
|
|
{path:'/', redirectTo: ['Phones']}
|
|
|
|
])
|
|
|
|
@Component({
|
2016-05-28 10:17:21 -04:00
|
|
|
selector: 'phonecat-app',
|
2016-02-26 11:21:31 -05:00
|
|
|
template: '<router-outlet></router-outlet>',
|
|
|
|
directives: [ROUTER_DIRECTIVES]
|
|
|
|
})
|
2016-05-28 10:17:21 -04:00
|
|
|
export class AppComponent {
|
2016-02-26 11:21:31 -05:00
|
|
|
}
|