Skip to content
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

Improve nzMatchRouter behaviour #3736

Closed
Svetomechc opened this issue Jul 4, 2019 · 9 comments · Fixed by #3785
Closed

Improve nzMatchRouter behaviour #3736

Svetomechc opened this issue Jul 4, 2019 · 9 comments · Fixed by #3785

Comments

@Svetomechc
Copy link
Contributor

What problem does this feature solve?

I expected nzMatchRouter directive to be the same as writing routerLinkActive #rla="routerLinkActive" [nzSelected]="rla.isActive". It is not.

What does the proposed API look like?

Please, make nzMatchRouter behave exactly like routerLinkActive #rla="routerLinkActive" [nzSelected]="rla.isActive" does.

@vthinkxie
Copy link
Member

they are working the same way
if you found any problem plz provide valid repro link

@zorro-bot
Copy link

zorro-bot bot commented Jul 5, 2019

Hello @Svetomechc. Please provide a online reproduction by forking this link https://stackblitz.com/edit/ng-zorro-antd-start or a minimal GitHub repository.
Issues labeled by Need Reproduce will be closed if no activities in 7 days.

你好 @Svetomechc, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 stackblitz 或者提供一个最小化的 GitHub 仓库
被标记为 Need Reproduce 的 issue 7 天内未跟进将会被自动关闭。

@Svetomechc
Copy link
Contributor Author

It is hard for me to reproduce outside my project as it uses custom dynamic menu building from routes meta info.

@Svetomechc
Copy link
Contributor Author

Svetomechc commented Jul 8, 2019

@vthinkxie okay, I did it: https://stackblitz.com/edit/ng-zorro-antd-start-ipf8qe?embed=1&file=src/app/app.component.html

  1. Navigate using first menu
  2. Press "Router link in the footer" text

You'll see differences between nzMatchRouter and routerLinkActive #rla="routerLinkActive" [nzSelected]="rla.isActive" immediately. Sadly, the former behaves worse than the latter :(

@Svetomechc
Copy link
Contributor Author

@vthinkxie is this reproduction ok?

@vthinkxie
Copy link
Member

@Svetomechc yes, fixed in #3785
thanks to your report!

@Svetomechc
Copy link
Contributor Author

My pleasure (:
What version will the fix land in?

@wzhudev
Copy link
Member

wzhudev commented Jul 15, 2019

8.0.3 @Svetomechc

@Svetomechc
Copy link
Contributor Author

Cool.

lppedd pushed a commit to lppedd/ng-zorro-antd that referenced this issue Jul 15, 2019
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this issue Apr 9, 2020
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants