File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 108
108
has the tag <b >< ; my-app> </b >.
109
109
The Dart code for an Angular component consists of a class
110
110
(the <b >component controller</b >)
111
- that has <code >@Component</code > and <code >@Template </code > annotations.
111
+ that has <code >@Component</code > and <code >@View </code > annotations.
112
112
113
113
114
114
.l-sub-section
119
119
the HTML tag for the component by specifying the component's CSS selector.
120
120
121
121
p.
122
- The <code >@Template </code > annotation defines the HTML that
122
+ The <code >@View </code > annotation defines the HTML that
123
123
represents the component. This component uses an inline template,
124
124
but you can also have an external template. To use an external template,
125
- specify a <code >url </code > property
125
+ specify a <code >templateUrl </code > property
126
126
and give it the path to the HTML file.
127
127
128
128
pre.prettyprint
129
129
code.
130
130
@Component(
131
131
selector: 'my-app'
132
132
)
133
- @Template (
134
- inline : '< h1> Hello {{ name }}< /h1> '
133
+ @View (
134
+ template : '< h1> Hello {{ name }}< /h1> '
135
135
)
136
136
137
137
// [PENDING: add line numbers once we can specify where they start]
Original file line number Diff line number Diff line change 14
14
pre.prettyprint.linenums.is-showcase
15
15
code.
16
16
@Component({selector: 'my-app'})
17
- @Template({inline : '< h1> Hi {{ name }}< /h1> '})
17
+ @View({template : '< h1> Hi {{ name }}< /h1> '})
18
18
19
19
// Component controller
20
20
class MyAppComponent {
You can’t perform that action at this time.
0 commit comments