简体   繁体   中英

Angular4 template reference variable assignment

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?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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