You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/angular2/docs/core/02_directives.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ The simplest kind of directive is a decorator. Directives are usefull for encaps
60
60
61
61
* Multiple decorators can be placed on a single element.
62
62
* Decorators do not introduce new evaluation context.
63
-
* Decorators are registered througt the `@Decorator` meta-data annotation.
63
+
* Decorators are registered through the `@Decorator` meta-data annotation.
64
64
65
65
Here is a trivial example of a tooltip decorator. The directive will log a tooltip into the console on every time mouse enters a region:
66
66
@@ -71,7 +71,7 @@ Here is a trivial example of a tooltip decorator. The directive will log a toolt
71
71
tooltip: 'text' // - DOM element tooltip property should be
72
72
}, // mapped to the directive text property.
73
73
event: { // List which events need to be mapped.
74
-
mouseover: 'show' // - Invoke the show() method ever time
74
+
mouseover: 'show' // - Invoke the show() method every time
75
75
} // the mouseover event is fired.
76
76
})
77
77
class Form { // Directive controller class, instantiated
@@ -98,7 +98,7 @@ Notice that data binding will work with this decorator with no further effort as
98
98
99
99
## Components
100
100
101
-
Component is a directive which uses shadow DOM to create encapsulate visual behavior. Components are tipically used to create UI widgets or to break up the application into smaller components.
101
+
Component is a directive which uses shadow DOM to create encapsulate visual behavior. Components are typically used to create UI widgets or to break up the application into smaller components.
102
102
103
103
* Only one component can be present per DOM element.
104
104
* Component's CSS selectors usually trigger on element names. (Best practice)
@@ -264,7 +264,7 @@ Injecting other directives into directives follows a similar mechanism as inject
264
264
265
265
There are five kinds of visibilities:
266
266
267
-
* (no annotation): Inject a directives only if it is on the current element.
267
+
* (no annotation): Inject dependant directives only if they are on the current element.
268
268
*`@ancestor`: Inject a directive if it is at any element above the current element.
269
269
*`@parent`: Inject a directive which is direct parent of the current element.
270
270
*`@child`: Inject a list of direct children which match a given type. (Used with `Query`)
@@ -337,4 +337,4 @@ Shadow DOM provides an encapsulation for components, so as a general rule it doe
0 commit comments