Angular
https://angular.dev/guide/components
| 英文官网 | 中文官网 | 文档 | CLI命令参考手册 | 项目文件结构 |
| Sections | Details |
| what-is-angular | |
| Understanding Angular | |
|
Interpolation (文本插值) uses the double curly braces
SyntaxYou can't use JavaScript (=, +=, -=, ... ; , ++, --,|,?,!)
Override interpolation delimiter {{}}插入符是可以通过interpolation 选项自定义成别的,在 |
|
|
|
Template statements (模板语句)—respond to events in your templates. |
|
|
Binding syntax—绑定语法
请注意,绑定是绑定到 disabled 这个 Property(属性),而不是 Attribute(属性)。数据绑定使用的是 DOM 元素、组件和指令的 Property,而不是 HTML Attribute
HTML attributes and DOM properties Example 1: an <input>
Example 2: a disabled button <button disabled="false">Still Disabled</button> --> 错误,没有这种写法,可以直接去掉disabled attibute
Property and attribute comparison[disabled] 是特性,值为true/false |
|
|
|
|
|
|
|
|
Template reference variables (#)
<input #phone placeholder="phone number" />
<!-- lots of other elements --> <!-- phone refers to the input element; pass its `value` to an event handler --> <button (click)="callPhone(phone.value)">Call</button>




浙公网安备 33010602011771号