docs(02_directives): TemplateConfig -> @Template

Update docs with new template api and remove previous cssUrl api
This commit is contained in:
gdi2290 2015-02-15 23:41:36 -08:00 committed by Victor Berchet
parent ec576ca90e
commit 85d4d13c77
1 changed files with 9 additions and 10 deletions

View File

@ -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 {} |
|