Angular4 template reference variable assignment

こ雲淡風輕ζ 提交于 2020-01-02 07:23:24

问题


I've come across this example where we can see:

<md-menu #menu="mdMenu">

I can't find any reference to the ="mdMenu" part of this template in the docs.

Is there some meaning to this or is it just a mistake on the example?


回答1:


In the doc [mdMenuTriggerFor]="menu" refers to <md-menu #menu="mdMenu">

and in #menu="mdMenu", mdMenu is the directive exported from Material.



来源:https://stackoverflow.com/questions/46581046/angular4-template-reference-variable-assignment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!