[4.x only] fix(router): do not finish bootstrap until all the routes are resolved#14155
[4.x only] fix(router): do not finish bootstrap until all the routes are resolved#14155vsavkin wants to merge 1 commit into
Conversation
85329f7 to
d7b75da
Compare
There was a problem hiding this comment.
You are right. It should be. As far as I know webworkers do not work with AoT, so it won't make a difference. I'll export it.
There was a problem hiding this comment.
can we remove the reference to "experimental libs" here (I doubt we will update the comment later on) ?
There was a problem hiding this comment.
should the default be null ? (what is the benefit of having an explicit default ?)
There was a problem hiding this comment.
so we don't have to check for null and use polymorphism to handle this case. We use the same approach to handle other defaults in the router (e.g., defaultErrorHandler)
There was a problem hiding this comment.
new Promise(res => res()) -> Promise.resolve(null) ?
There was a problem hiding this comment.
do we have testsfor the return value ?
There was a problem hiding this comment.
Every integration test checks this value since it is used by the navigation pipeline. If the value were incorrect, the navigation results would have been different.
|
Thanks for the PR and sorry for the review delay. Mostly nits, missing tests ? |
d7b75da to
e9c420e
Compare
|
Thanks for reviewing it! I addressed the comments. I created bootstrap.spec.ts that tests the behaviour. What do you think should be tested separately? |
|
Btw, I also have a version of this PR for the 2.x branch #14327 |
e9c420e to
d95e1ec
Compare
There was a problem hiding this comment.
void isn't an expression. I can use undefined, but I don't think we use undefined very much in the codebase, that's why I chose null.
d95e1ec to
9252c92
Compare
|
@vicb this breaks g3. Could you have a look? |
|
Update: I cherry-picked the commit onto the 2.x branch. You can find it here: #14327 |
9252c92 to
f33f7b8
Compare
sync a 4.x change from angular#14155
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Updated 2.x branch #14327