Angular的property binding一个例子
生活随笔
收集整理的這篇文章主要介紹了
Angular的property binding一个例子
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
語法,在中括號里填上html標簽的屬性名稱:
<h2>Products</h2><div *ngFor="let product of productsJerry2"><h3><a [title]="product.name + ' details'">{{ product.name }}</a></h3><p *ngIf="product.description">Description: {{ product.description }}</p><button (click)="share()">Share</button> </div>最后渲染出來的html源代碼:
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
總結
以上是生活随笔為你收集整理的Angular的property binding一个例子的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 元旦礼物,我整理了二十多个图片素材网站送
- 下一篇: Angular 条件指令 ngIf 的一