fix(guide): remove directives that aren't yet used from displaying-data
This commit is contained in:
parent
cb615382b5
commit
9827bc7466
|
@ -42,7 +42,7 @@
|
||||||
code-tabs
|
code-tabs
|
||||||
code-pane(language="javascript" name="TypeScript" format="linenums" escape="html").
|
code-pane(language="javascript" name="TypeScript" format="linenums" escape="html").
|
||||||
// TypeScript
|
// TypeScript
|
||||||
import {Component, View, bootstrap, For} from 'angular2/angular2';
|
import {Component, View, bootstrap} from 'angular2/angular2';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'display'
|
selector: 'display'
|
||||||
|
@ -50,12 +50,10 @@
|
||||||
@View({
|
@View({
|
||||||
template: `
|
template: `
|
||||||
<p>My name: {{ myName }}</p>
|
<p>My name: {{ myName }}</p>
|
||||||
`,
|
`
|
||||||
directives: [For]
|
|
||||||
})
|
})
|
||||||
class DisplayComponent {
|
class DisplayComponent {
|
||||||
myName: string;
|
myName: string;
|
||||||
names: Array<string>;
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.myName = "Alice";
|
this.myName = "Alice";
|
||||||
|
@ -72,8 +70,7 @@
|
||||||
}),
|
}),
|
||||||
new angular.ViewAnnotation({
|
new angular.ViewAnnotation({
|
||||||
template:
|
template:
|
||||||
'<p>My name: {{ myName }}</p>',
|
'<p>My name: {{ myName }}</p>'
|
||||||
directives: [angular.For, angular.If]
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue