Skip to content

fix(router): fix some empty path related navigation bugs#26243

Closed
miginmrs wants to merge 2 commits into
angular:masterfrom
miginmrs:my-fix-branch
Closed

fix(router): fix some empty path related navigation bugs#26243
miginmrs wants to merge 2 commits into
angular:masterfrom
miginmrs:my-fix-branch

Conversation

@miginmrs

@miginmrs miginmrs commented Oct 4, 2018

Copy link
Copy Markdown
Contributor

fix some empty path related navigation bugs

PR Close #26224, #10726

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[X] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] angular.io application / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #26224 , #10726

What is the new behavior?

  • The next path of a pathless activated route is no longer added to the url and the commands passed to the createUrlTree are no longer added as children of an undefined outlet of this path but as children of the actual url.
  • The navigation to aux routes with empty-path parent route is now possible.

Does this PR introduce a breaking change?

[ ] Yes
[X] No

@IgorMinar IgorMinar requested review from jasonaden and mhevery and removed request for jasonaden and mhevery October 4, 2018 22:43
@miginmrs

miginmrs commented Oct 5, 2018

Copy link
Copy Markdown
Contributor Author

@jasonaden @adriensamson @IgorMinar, Please some review, I get this exception with TravisCI but not locally and I don't understand what my tiny changes in route component have to do with render3 directive injection in core component ?

Chrome 67.0.3396 (Windows 7 0.0.0) di directive injection flags should check only the current node with @Self even with false positive FAILED
	Expected function to throw an Error.
        const App = createComponent('app', function(rf: RenderFlags, ctx: any) {
          if (rf & RenderFlags.Create) {
            elementStart(0, 'div', ['dirB', '']);
            element(1, 'div', ['dirA', '', 'dirC', '']);
            elementEnd();
          }
        }, 2, 0, [DirA, DirB, DirC]);

        expect(() => {
          (DirA as any)['__NG_ELEMENT_ID__'] = 1;
          (DirC as any)['__NG_ELEMENT_ID__'] = 257;
          new ComponentFixture(App);
        }).toThrowError(/Injector: NOT_FOUND \[DirB\]/);

Thank you very much for your attention

@miginmrs miginmrs changed the title fix(router): change processing url tree children condition fix(router): fix some empty path related navigation bugs Oct 5, 2018
@jasonaden jasonaden self-requested a review November 20, 2018 23:41
@jasonaden jasonaden self-assigned this Nov 20, 2018
@jasonaden

Copy link
Copy Markdown
Contributor

Presubmit

@jasonaden

Copy link
Copy Markdown
Contributor

This looks good. I rebased and pushed back, so you'll see a force push on this branch. Will try to get this merged quickly.

@jasonaden

Copy link
Copy Markdown
Contributor

Updated Presubmit

@jasonaden jasonaden added the action: merge The PR is ready for merge by the caretaker label Dec 5, 2018
@ngbot ngbot Bot added this to the needsTriage milestone Dec 5, 2018
@jasonaden jasonaden added the target: patch This PR is targeted for the next patch release label Dec 5, 2018
IgorMinar pushed a commit that referenced this pull request Dec 5, 2018
stop adding next path of pathless activated route to the url

PR Close #26224

PR Close #26243
@IgorMinar IgorMinar closed this in ccc77ca Dec 5, 2018
@jasonaden jasonaden added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Dec 5, 2018
IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 6, 2018
…d outlet (angular#26243)"

This reverts commit 20cef50.

Breaks Pantheon see cl/224256517.
IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 6, 2018
IgorMinar added a commit that referenced this pull request Dec 6, 2018
…d outlet (#26243)" (#27516)

This reverts commit 20cef50.

Breaks Pantheon see cl/224256517.

PR Close #27516
IgorMinar added a commit that referenced this pull request Dec 6, 2018
…26243)" (#27516)

This reverts commit ccc77ca.

Breaks Pantheon see cl/224256517.

PR Close #27516
IgorMinar added a commit that referenced this pull request Dec 6, 2018
…d outlet (#26243)" (#27516)

This reverts commit 20cef50.

Breaks Pantheon see cl/224256517.

PR Close #27516
IgorMinar added a commit that referenced this pull request Dec 6, 2018
…26243)" (#27516)

This reverts commit ccc77ca.

Breaks Pantheon see cl/224256517.

PR Close #27516
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: router cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pathless route consumes next path

4 participants