把属性型指令统一改为Attribute型指令
This commit is contained in:
parent
1afe12d0ad
commit
1ba397bf1c
@ -38,7 +38,7 @@ include _util-fns
|
|||||||
// #docregion a-2
|
// #docregion a-2
|
||||||
:marked
|
:marked
|
||||||
## Attribute Directive
|
## Attribute Directive
|
||||||
## 属性型指令(Attribute Directive)
|
## Attribute型指令(Attribute Directive)
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
:marked
|
:marked
|
||||||
A category of [Directive](#directive) that can listen to and modify the behavior of
|
A category of [Directive](#directive) that can listen to and modify the behavior of
|
||||||
@ -50,7 +50,7 @@ include _util-fns
|
|||||||
The `ngClass` directive for adding and removing CSS class names is a good example of
|
The `ngClass` directive for adding and removing CSS class names is a good example of
|
||||||
an Attribute Directive.
|
an Attribute Directive.
|
||||||
|
|
||||||
`ngClass`指令就是典型的属性型指令。它可以添加或移除CSS类名。
|
`ngClass`指令就是典型的Attribute型指令。它可以添加或移除CSS类名。
|
||||||
// #enddocregion a-2
|
// #enddocregion a-2
|
||||||
|
|
||||||
// #docregion b-c
|
// #docregion b-c
|
||||||
|
@ -64,8 +64,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"attribute-directives": {
|
"attribute-directives": {
|
||||||
"title": "属性型指令",
|
"title": "Attribute型指令",
|
||||||
"intro": "属性型指令把行为添加到现有元素上。"
|
"intro": "Attribute型指令把行为添加到现有元素上。"
|
||||||
},
|
},
|
||||||
|
|
||||||
"component-styles": {
|
"component-styles": {
|
||||||
|
@ -579,11 +579,11 @@ figure
|
|||||||
**Attribute** directives alter the appearance or behavior of an existing element.
|
**Attribute** directives alter the appearance or behavior of an existing element.
|
||||||
In templates they look like regular HTML attributes, hence the name.
|
In templates they look like regular HTML attributes, hence the name.
|
||||||
|
|
||||||
**属性型指令** 修改一个现有元素的外观或行为。在模板中,它们看起来就像是标准的HTML属性,故名。
|
**Attribute型指令** 修改一个现有元素的外观或行为。在模板中,它们看起来就像是标准的HTML属性,故名。
|
||||||
|
|
||||||
The `ngModel` directive, which implements two-way data binding, is an example of an attribute directive.
|
The `ngModel` directive, which implements two-way data binding, is an example of an attribute directive.
|
||||||
|
|
||||||
`ngModel`指令是一个属性型指令的范例,它实现了双向数据绑定。
|
`ngModel`指令是一个Attribute型指令的范例,它实现了双向数据绑定。
|
||||||
+makeExample('architecture/ts/app/hero-detail.component.html', 'ngModel')(format=".")
|
+makeExample('architecture/ts/app/hero-detail.component.html', 'ngModel')(format=".")
|
||||||
:marked
|
:marked
|
||||||
It modifies the behavior of an existing element (typically an `<input>`)
|
It modifies the behavior of an existing element (typically an `<input>`)
|
||||||
|
@ -230,7 +230,7 @@ code-example(format=".").
|
|||||||
Learn more about the `@Input()` decorator in the
|
Learn more about the `@Input()` decorator in the
|
||||||
[Attribute Directives](../guide/attribute-directives.html#input) chapter.
|
[Attribute Directives](../guide/attribute-directives.html#input) chapter.
|
||||||
|
|
||||||
要了解`@Input()`装饰器的更多知识,参见[属性型指令](../guide/attribute-directives.html#input)一章。
|
要了解`@Input()`装饰器的更多知识,参见[Attribute型指令](../guide/attribute-directives.html#input)一章。
|
||||||
.l-main-section
|
.l-main-section
|
||||||
:marked
|
:marked
|
||||||
## Refresh the AppComponent
|
## Refresh the AppComponent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user