日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Angular开发文档中一些常用的词汇

發布時間:2023/12/19 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Angular开发文档中一些常用的词汇 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
  • interpolation: 指Angular特有的雙大括號語法{{ }}

  • backticks: `

  • ASTERISK:[??st?r?sk]

  • template reference variable, 語法是#:

  • 命名沖突的優先級:If you reference a name that belongs to more than one of these namespaces, the template variable name takes precedence, followed by a name in the directive’s context, and, lastly, the component’s member names.

  • template statement: responds to an event raised by a binding target such as an element, component, or directive.
    例子:

    statement context就是其所屬的Component:

The statement context is typically the component instance. The deleteHero in (click)=“deleteHero()” is a method of the data-bound component.

優先級:Template context names take precedence over component context names. In deleteHero(hero) above, the hero is the template input variable, not the component’s hero property.

  • binding語法
<!-- Bind button disabled state to `isUnchanged` property --> <button [disabled]="isUnchanged">Save</button>

Notice that the binding is to the disabled property of the button’s DOM element, not the attribute. This applies to data-binding in general. Data-binding works with properties of DOM elements, components, and directives, not HTML attributes.

The distinction between an HTML attribute and a DOM property is key to understanding how Angular binding works. Attributes are defined by HTML. Properties are accessed from DOM (Document Object Model) nodes. - 完全兩碼事!

Attributes initialize DOM properties and then they are done. Property values can change; attribute values can’t. - HTML attribute用來初始化DOM properties,之后就沒有用了. HTML attribute無法修改。

總結

以上是生活随笔為你收集整理的Angular开发文档中一些常用的词汇的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。