【问题标题】:what is the use of #attribute in html5 using angular2html5中使用angular2的#attribute有什么用
【发布时间】:2017-11-09 19:39:43
【问题描述】:

我是 Angular 2 的新手。我想知道 #something 是什么。它是干什么用的? 例如:

<div #something></div>

【问题讨论】:

标签: html typescript angular2-template


【解决方案1】:

用于声明局部变量。

您可以使用它来分配一些您可能想要使用的值

<div #something="localVar"> </div>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-02-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多