Slide 33
Slide 33 text
@Component({
selector: 'sample-app',
componentServices: [
NameList
]
})
@Template({
url: './templates/sample-app.html',
directives: [Foreach]
})
class SampleApp {
constructor() {
this.names = NameList.get();
this.newName = '';
}
addName(newname) {
this.names.push(newname.value);
newname.value = '';
}
}