Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit e9c8bc6

Browse files
David limkysDavid limkys
authored andcommitted
Added a test.
1 parent 6d4bbef commit e9c8bc6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/router-viewport.es5.spec.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,18 @@ describe('ngOutlet', function () {
701701
expect($router.navigating).toBe(false);
702702
});
703703

704+
it('Should allow navigating by component name', function () {
705+
compile('<ng-viewport></ng-viewport>');
706+
707+
$router.config([
708+
{ path: '/', component: 'one' }
709+
]);
710+
711+
$router.navigate('/');
712+
$rootScope.$digest();
713+
714+
expect(elt.text()).toBe('one');
715+
});
704716

705717
function registerComponent(name, template, componentConstructor, routeConfig) {
706718
if (!template) {

0 commit comments

Comments
 (0)