-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(router-view): register instance in init hook (fix #2561) #2689
Conversation
Hey could you add a test for this? An e2e test should do it |
Yes, i will. |
@posva , e2e test added. |
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.
Thanks, I'm merging this locally after applying some modifications (splitting the e2e test to keep the navigation guard one in an existing e2e test and the keep alive in another
Fix #2561 Close ##2689 Squashed commit of the following: commit e18dd2f660b2154b26e6afa9d60ac76b047b8e40 Author: Eduardo San Martin Morote <[email protected]> Date: Mon Apr 15 12:54:55 2019 +0200 refactor: use keepalive example instead commit 2c458af27f5371c690c2832d59e0b670e43a17fa Author: Eduardo San Martin Morote <[email protected]> Date: Mon Apr 15 11:48:24 2019 +0200 refactor: remove unused classes commit 8467722640ee11baecabf52dd91bbc7d90d370a0 Author: zrh122 <[email protected]> Date: Sun Mar 31 05:26:05 2019 +0800 test: add e2e test for #2561 commit af0ff980b4ca0b32637aa34d692587a790790947 Author: zrh122 <[email protected]> Date: Sat Mar 30 13:57:38 2019 +0800 fix(router-view): register instance in init hook close #2561
Merged locally! |
@posva the e2e test for #2561 may be not correct. I removed the code (register instance in init hook), and executed mine: // routes
[
// foo1
{ path: '/foo1', component: Foo },
// foo2, same component as foo1
{ path: '/foo2', component: Foo },
// bar
{ path: '/bar', component: Bar }
] click order: yours: // routes
[
{
path: '/with-guard1',
name: 'with-guard1',
component: WithGuard
},
{
path: '/with-guard2',
name: 'with-guard2',
component: WithGuard
}
] click order: maybe you can add another route, and the click order can be:
|
Right! Thanks for checking, I'm going to fix the test |
close #2561