Victor Berchet da9b46a071 feat: camelCase Angular (kebab-case removal)
BREAKING CHANGE:

Angular is now fully camel case.

Before:

    <p *ng-if="cond">
    <my-cmp [my-prop]="exp">
    <my-cmp (my-event)="action()">
    <my-cmp [(my-prop)]="prop">
    <input #my-input>
    <template ng-for #my-item [ng-for-of]=items #my-index="index">

After

    <p *ngIf="cond">
    <my-cmp [myProp]="exp">
    <my-cmp (myEvent)="action()">
    <my-cmp [(myProp)]="prop">
    <input #myInput>`,
    <template ngFor="#my-item" [ngForOf]=items #myIndex="index">

The full details are found in [angular2/docs/migration/kebab-case.md](https://github.com/angular/angular/blob/master/modules/angular2/docs/migration/kebab-case.md)
2015-12-09 19:59:40 -08:00

26 lines
543 B
TypeScript

import {bootstrap} from 'angular2/bootstrap';
import {Component, View} from 'angular2/core';
import {Zippy} from './zippy';
@Component({selector: 'zippy-app'})
@View({
template: `
<zippy (open)="pushLog('open')" (close)="pushLog('close')" title="Details">
This is some content.
</zippy>
<ul>
<li *ngFor="var log of logs">{{log}}</li>
</ul>
`,
directives: [Zippy]
})
class ZippyApp {
logs: string[] = [];
pushLog(log: string) { this.logs.push(log); }
}
export function main() {
bootstrap(ZippyApp);
}