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

Commit cc907a3

Browse files
David limkysDavid limkys
authored andcommitted
Added a test.
1 parent 21978cd commit cc907a3

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/router-viewport.es5.spec.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,18 @@ describe('ngViewport', function () {
647647
expect($router.navigating).toBe(false);
648648
});
649649

650+
it('Should allow navigating by component name', function () {
651+
compile('<ng-viewport></ng-viewport>');
652+
653+
$router.config([
654+
{ path: '/', component: 'one' }
655+
]);
656+
657+
$router.navigate('/');
658+
$rootScope.$digest();
659+
660+
expect(elt.text()).toBe('one');
661+
});
650662

651663
function registerComponent(name, template, config) {
652664
if (!template) {

0 commit comments

Comments
 (0)