angular five common grammar

1、遍历          *ngFor   *ngFor = "let product of products "

2, the interpolation syntax {{}} <div> {{}} </ div>

3, binding properties [] <a [title] = "product.name+'details'">

4, it is determined syntax * ngIf * ngIf = "product.desription"

5, event binding () <button (click) = "share ()"> share </ button>

Note: The syntax, the first letter of the second word is capitalized with an asterisk. Analyzing Syntax: when a property value is empty, it will not be displayed. Event Binding: must have '()' binding in parentheses behind;

Guess you like

Origin www.cnblogs.com/lljun/p/11460984.html