feat(router): add pathMatch property to replace terminal

This commit is contained in:
vsavkin
2016-06-27 20:10:36 -07:00
parent dc64e90ab9
commit fcfddbf79c
9 changed files with 56 additions and 39 deletions

View File

@ -37,17 +37,17 @@ describe('Integration', () => {
];
});
fit('should navigate with a provided config',
fakeAsync(inject(
[Router, TestComponentBuilder, Location],
(router: Router, tcb: TestComponentBuilder, location: Location) => {
const fixture = createRoot(tcb, router, RootCmp);
it('should navigate with a provided config',
fakeAsync(inject(
[Router, TestComponentBuilder, Location],
(router: Router, tcb: TestComponentBuilder, location: Location) => {
const fixture = createRoot(tcb, router, RootCmp);
router.navigateByUrl('/simple');
advance(fixture);
router.navigateByUrl('/simple');
advance(fixture);
expect(location.path()).toEqual('/simple');
})));
expect(location.path()).toEqual('/simple');
})));
it('should update location when navigating',
@ -262,7 +262,7 @@ describe('Integration', () => {
const fixture = createRoot(tcb, router, RootCmp);
router.resetConfig([
{path: '', terminal: true, component: SimpleCmp},
{path: '', pathMatch: 'full', component: SimpleCmp},
{path: 'user/:name', component: UserCmp}
]);
@ -830,7 +830,7 @@ describe('Integration', () => {
path: 'team/:id',
component: TeamCmp,
children: [
{path: '', terminal: true, component: SimpleCmp}, {
{path: '', pathMatch: 'full', component: SimpleCmp}, {
path: 'user/:name',
component: UserCmp,
canDeactivate: ['CanDeactivateUser']