-
Notifications
You must be signed in to change notification settings - Fork 134
$router.navigate to component #256
base: master
Are you sure you want to change the base?
Conversation
Needs corresponding tests, but otherwise looks alright! |
I already added tests, If you think I missed some use cases let me know and I'll add them. |
I don't see any in the commits in this PR. Can you update your branch, maybe? |
Amm this is wired, I guess I forgot to push that commit, I'll do that when I get home and update. |
Hi, added a single test, couldn't think of any more uses cases that are not already being taken care of. The build seems to be failing but that's not because of my commit (so awesome?). |
Rebased to master, build passes now. |
{ path: '/', component: 'one' } | ||
]); | ||
|
||
$router.navigate('/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be testing $router.navigate('one');
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed it should, I have fallen victim to the monster of copy&paste, Thanks :)
👍 |
awesome work! hope it gets merged. |
I was thinking it was quite odd that we cant navigate by component name and only by url, so I added the functionality.
You can now do this:
You can still use the same function to navigate by url.
Currently the function tries by url, if none found it tries by component name.
Maybe this should be separated ?
Your thoughts ?