diff --git a/angular2/app.js b/angular2/app.js index 5177d4c5..d3ca37ff 100644 --- a/angular2/app.js +++ b/angular2/app.js @@ -1,24 +1,24 @@ -function AppComponent() { - var me = this; - this.databases = []; - var load = function() { - me.databases = ENV.generateData().toArray(); - Monitoring.renderRate.ping(); - setTimeout(load, ENV.timeout); - }; - load(); -} - -AppComponent.annotations = [ - new angular.ComponentAnnotation({ - selector: 'my-app' - }), - new angular.ViewAnnotation({ - directives: [angular.NgFor], - templateUrl: 'app-component.html' - }) -]; +var AppComponent = ng. + Component({ + selector: 'my-app' + }). + View({ + directives: [ng.NgFor], + templateUrl: 'app-component.html' + }). + Class({ + constructor: function AppComponent() { + var me = this; + this.databases = []; + var load = function() { + me.databases = ENV.generateData().toArray(); + Monitoring.renderRate.ping(); + setTimeout(load, ENV.timeout); + }; + load(); + } + }) document.addEventListener('DOMContentLoaded', function() { - angular.bootstrap(AppComponent); + ng.bootstrap(AppComponent); }); \ No newline at end of file diff --git a/angular2/index.html b/angular2/index.html index 55de79a1..5315222d 100644 --- a/angular2/index.html +++ b/angular2/index.html @@ -1,7 +1,7 @@
- +