Slide 7
Slide 7 text
app.es6
import {Component, Template, bootstrap} from ‘angular2/angular2’;
@Component({
selector: ‘hello-app’
})
@Template({
inline: ‘
Hello, {{name}}!
’
})
class HelloApp {
constructor() {
this.name = ‘Ryozanpark’;
}
}
bootstrap(HelloApp);
ES6 Modules instead of angular.module()
Decorators add metadata
to component class.
Somewhat like DDO.
Component:
Pair of controller and template