简体   繁体   English

在表格的每一行都有导航链接

[英]Have navigation links in table for each row

I am trying to figure out if its possible to register links in the Table component of angular2-mdl. 我试图找出是否有可能在angular2-mdl的Table组件中注册链接。

Idea is that one column will contain the anchor to the component user needs to go to. 想法是,一列将包含用户需要转到的组件的锚点。

Normally this would be easy on html as you use [routerLink]="" on anchor or button, but is it possible to generate this in the TS file and pass it to the table element? 通常在html上这很容易,因为您在锚点或按钮上使用了[routerLink] =“”,但是可以在TS文件中生成它并将其传递给table元素吗?

remove the [] from the routerLink element and insert your variable. 从routerLink元素中删除[],然后插入变量。

like: Dynamic routerLink value from ngFor item giving error "Got interpolation ({{}}) where expression was expected" 例如: 来自ngFor的动态routerLink值,该项目给出错误“需要插值({{}})的表达式”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM