diff --git a/demo/bouncy_balls/bouncy_balls.dart b/demo/bouncy_balls/bouncy_balls.dart index e23160ebe..a1734d203 100644 --- a/demo/bouncy_balls/bouncy_balls.dart +++ b/demo/bouncy_balls/bouncy_balls.dart @@ -25,6 +25,10 @@ class BallModel { } +@NgController( + selector: '[bounce-controller]', + publishAs: 'bounce' +) class BounceController { var lastTime = window.performance.now(); var run = true; @@ -35,7 +39,7 @@ class BounceController { var scope; var ballClassName = 'ball'; - BounceController(Zone this.zone, Scope this.scope) { + BounceController(NgZone this.zone, Scope this.scope) { changeCount(100); tick(); } @@ -95,7 +99,7 @@ class BounceController { @NgDirective( selector: '[ball-position]', map: const { - "ballPosition": '=.position' + "ballPosition": '=>position' } ) class BallPositionDirective { @@ -112,11 +116,13 @@ class BallPositionDirective { } } -main() { - var ngModule = new AngularModule(); - - ngModule.controller('Bounce', BounceController); - ngModule.directive(BallPositionDirective); +class MyModule extends Module { + MyModule() { + type(BounceController); + type(BallPositionDirective); + } +} - bootstrapAngular([ngModule]); +main() { + ngBootstrap(module: new MyModule()); } diff --git a/demo/bouncy_balls/index.html b/demo/bouncy_balls/index.html index e16b20011..267371c28 100644 --- a/demo/bouncy_balls/index.html +++ b/demo/bouncy_balls/index.html @@ -37,7 +37,7 @@ -
+