f14b212dc9
This change moves many APIs to the angular2/core export.
This change also automatically adds FORM_BINDINGS in
the application root injector.
BREAKING CHANGE:
Many dependencies that were previously exported from specific
APIs are now exported from angular2/core. Affected exports, which
should now be included from angular2/core include:
angular2/forms
angular2/di
angular2/directives
angular2/change_detection
angular2/bootstrap (except for dart users)
angular2/render
angular2/metadata
angular2/debug
angular2/pipes
Closes #3977
21 lines
542 B
TypeScript
21 lines
542 B
TypeScript
import {bootstrap} from 'angular2/bootstrap';
|
|
import {Component, View} from 'angular2/core';
|
|
|
|
@Component({selector: 'gestures-app'})
|
|
@View({templateUrl: 'template.html'})
|
|
class GesturesCmp {
|
|
swipeDirection: string = '-';
|
|
pinchScale: number = 1;
|
|
rotateAngle: number = 0;
|
|
|
|
onSwipe(event): void { this.swipeDirection = event.deltaX > 0 ? 'right' : 'left'; }
|
|
|
|
onPinch(event): void { this.pinchScale = event.scale; }
|
|
|
|
onRotate(event): void { this.rotateAngle = event.rotation; }
|
|
}
|
|
|
|
export function main() {
|
|
bootstrap(GesturesCmp);
|
|
}
|