Merge pull request #72 from HenriqueLimas/master
fix(Templates) rename Template to View
This commit is contained in:
commit
bd947b2cf6
|
@ -108,7 +108,7 @@ p.
|
||||||
has the tag <b><my-app></b>.
|
has the tag <b><my-app></b>.
|
||||||
The Dart code for an Angular component consists of a class
|
The Dart code for an Angular component consists of a class
|
||||||
(the <b>component controller</b>)
|
(the <b>component controller</b>)
|
||||||
that has <code>@Component</code> and <code>@Template</code> annotations.
|
that has <code>@Component</code> and <code>@View</code> annotations.
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
|
@ -119,10 +119,10 @@ p.
|
||||||
the HTML tag for the component by specifying the component's CSS selector.
|
the HTML tag for the component by specifying the component's CSS selector.
|
||||||
|
|
||||||
p.
|
p.
|
||||||
The <code>@Template</code> annotation defines the HTML that
|
The <code>@View</code> annotation defines the HTML that
|
||||||
represents the component. This component uses an inline template,
|
represents the component. This component uses an inline template,
|
||||||
but you can also have an external template. To use an external template,
|
but you can also have an external template. To use an external template,
|
||||||
specify a <code>url</code> property
|
specify a <code>templateUrl</code> property
|
||||||
and give it the path to the HTML file.
|
and give it the path to the HTML file.
|
||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
|
@ -130,8 +130,8 @@ p.
|
||||||
@Component(
|
@Component(
|
||||||
selector: 'my-app'
|
selector: 'my-app'
|
||||||
)
|
)
|
||||||
@Template(
|
@View(
|
||||||
inline: '<h1>Hello {{ name }}</h1>'
|
template: '<h1>Hello {{ name }}</h1>'
|
||||||
)
|
)
|
||||||
|
|
||||||
// [PENDING: add line numbers once we can specify where they start]
|
// [PENDING: add line numbers once we can specify where they start]
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
pre.prettyprint.linenums.is-showcase
|
pre.prettyprint.linenums.is-showcase
|
||||||
code.
|
code.
|
||||||
@Component({selector: 'my-app'})
|
@Component({selector: 'my-app'})
|
||||||
@Template({inline: '<h1>Hi {{ name }}</h1>'})
|
@View({template: '<h1>Hi {{ name }}</h1>'})
|
||||||
|
|
||||||
// Component controller
|
// Component controller
|
||||||
class MyAppComponent {
|
class MyAppComponent {
|
||||||
|
|
Loading…
Reference in New Issue