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

el-menu-item 绑定click 和 routerLink 进行跳转的时候没有效果 #4

Closed
1 task
zhaoshiming opened this issue Jan 30, 2018 · 2 comments
Closed
1 task

Comments

@zhaoshiming
Copy link

Issue Type:

  • Bug

Version & Environment:

"@angular/cli": "1.6.5",
"@angular/core": "^5.2.0",
"element-angular": "^0.5.4",

Description:
我在这个元素上绑定routerLink="/index"的时候是无效的,换成(click)="go()"也是无效的,并且在对应的元素上没有看到(click)绑定在元素上。
另外el-for-angular是不是没有 :router这个属性,因为我这样尝试的时候也是无效的。
谢谢。

@unix
Copy link
Contributor

unix commented Jan 31, 2018

没有 :router 属性,因为把整个 router 对象传递太大了不合适。
你可以把 model 分开绑定为 (modelChange)="go($event)" 来拿到当前的点击的子菜单的值。menu-item 本身是没有点击事件的。

另外集成路由用 router-link 绑定也不错,后续可以在 menu-item 加上这个属性。

@unix
Copy link
Contributor

unix commented Jan 31, 2018

#7 ,已经加上了。

@unix unix closed this as completed Jan 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants