From 85d4d13c7746e4520631565eb139a13e2ae79ff0 Mon Sep 17 00:00:00 2001 From: gdi2290 Date: Sun, 15 Feb 2015 23:41:36 -0800 Subject: [PATCH] docs(02_directives): TemplateConfig -> @Template Update docs with new template api and remove previous cssUrl api --- modules/angular2/docs/core/02_directives.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/modules/angular2/docs/core/02_directives.md b/modules/angular2/docs/core/02_directives.md index c95f0b33fc..666a9f8189 100644 --- a/modules/angular2/docs/core/02_directives.md +++ b/modules/angular2/docs/core/02_directives.md @@ -116,10 +116,9 @@ Example of a component: 'title': 'title', | - title mapped to component title 'open': 'open' | - open mapped to component title }, | - template: new TemplateConfig({ | Define template to be used with component - url: 'pane.html', | - URL of template HTML - cssUrl: 'pane.css' | - URL of CSS to be used with the component - }) | +}) | +@Template({ | Template annotation + url: 'pane.html' | - URL of template HTML }) | class Pane { | Component controller class title:string; | - title property @@ -231,12 +230,12 @@ class MyService {} | Assume a service which needs to be inject | into a directive. | @Component({ | Assume a top level application component which - selector: 'my-app', | configures the service, template and the - componentServices: [MyService], | directive into which we wish to inject the - template: new TemplateConfig({ | service. - url: 'my_app.html', | - directives: [House] | - }) | + selector: 'my-app', | configures the services to be injected. + componentServices: [MyService] | +}) | +@Template({ | Assume we have a template that needs to be + url: 'my_app.html', | configured with directives to be injected. + directives: [House] | }) | class MyApp {} | |