@@ -112,9 +112,7 @@ Example of a component:
112112 'title', | - title mapped to component title
113113 'open' | - open attribute mapped to component's open property
114114 ], |
115- }) |
116- @View({ | View annotation
117- templateUrl: 'pane.html' | - URL of template HTML
115+ templateUrl: 'pane.html' | URL of template HTML
118116}) |
119117class Pane { | Component controller class
120118 title:string; | - title property
@@ -227,11 +225,9 @@ class MyService {} | Assume a service which needs to be inject
227225 |
228226@Component({ | Assume a top level application component which
229227 selector: 'my-app', | configures the services to be injected.
230- viewBindings: [MyService] |
231- }) |
232- @View({ | Assume we have a template that needs to be
233- templateUrl: 'my_app.html', | configured with directives to be injected.
234- directives: [House] |
228+ viewBindings: [MyService], |
229+ templateUrl: 'my_app.html', | Assume we have a template that needs to be
230+ directives: [House] | configured with directives to be injected.
235231}) |
236232class MyApp {} |
237233 |
@@ -273,8 +269,6 @@ Here is an example of the kinds of injections which can be achieved:
273269```
274270@Component({ |
275271 selector: 'my-app' |
276- }) |
277- @View({ |
278272 templateUrl: 'my_app.html', |
279273 directives: [Form, FieldSet, |
280274 Field, Primary] |
@@ -329,8 +323,6 @@ Shadow DOM provides an encapsulation for components, so as a general rule it doe
329323```
330324@Component({
331325 selector: '[kid]'
332- })
333- @View({
334326 templateUrl: 'kid.html',
335327 directives: []
336328})
@@ -347,8 +339,6 @@ class Kid {
347339
348340@Component({
349341 selector: '[dad]'
350- })
351- @View({
352342 templateUrl: 'dad.html',
353343 directives: [Kid]
354344})
@@ -361,9 +351,7 @@ class Dad {
361351
362352@Component({
363353 selector: '[grandpa]',
364- viewBindings: []
365- })
366- @View({
354+ viewBindings: [],
367355 templateUrl: 'grandpa.html',
368356 directives: [Dad]
369357})
0 commit comments