The Official European Angular Conference 2015
http://angularconnect.com
メモ
個人的にAngularDartなので、ng1のアップデートについては未チェック。
以下、Angular2について。
template
https://youtu.be/4pSd6KbrKX8?t=52m21s
https://youtu.be/UxjgUjVpe24?t=16m36s
templateでの属性値割り当て
[attribute]
(event)
[(two-way)]
この記法はHAMLではエスケープできないので、HTML直書きの必要がある。
- HTML template + data = DOM view
- XML template + data = native view
- WebGL template + data = 3D view
angular-cli
$ npm install -g angular-cli
$ ng new your-project
$ ng serve
$ ng generate component your-component
$ ng github-pages:deploy
Routing
@Component(...)
@RouteConfig([
{path: '/:id', conponent: IndexCmp, as: 'Link'},
...
])
class AppCmp{
constructor(params: RouteParams) {
this.id = params.get('id');
}
}
Link DSL
componentには、<a [routing-link]="'/', ['Link']">
で利用するAliasを設定できる。
Web Components
TODO: この子かわいいので100回リスニングする。