2016-03-16 18:01:33 +02:00
|
|
|
// #docplaster
|
|
|
|
// #docregion appexport
|
|
|
|
(function(app) {
|
|
|
|
|
|
|
|
// #docregion component
|
|
|
|
var HeroComponent = ng.core.Component({
|
|
|
|
selector: 'hero-view-2',
|
2016-11-03 01:37:55 -07:00
|
|
|
template: '<h1>{{title}}: {{getName()}}</h1>',
|
2016-03-16 18:01:33 +02:00
|
|
|
})
|
|
|
|
.Class({
|
|
|
|
constructor: function() {
|
2016-11-03 01:37:55 -07:00
|
|
|
this.title = "Hero Detail";
|
2016-03-16 18:01:33 +02:00
|
|
|
},
|
2016-11-03 01:37:55 -07:00
|
|
|
getName: function() { return 'Windstorm'; }
|
2016-03-16 18:01:33 +02:00
|
|
|
});
|
|
|
|
// #enddocregion component
|
|
|
|
|
2016-08-09 17:38:25 +01:00
|
|
|
app.HeroesDslModule =
|
|
|
|
ng.core.NgModule({
|
|
|
|
imports: [ ng.platformBrowser.BrowserModule ],
|
|
|
|
declarations: [ HeroComponent ],
|
|
|
|
bootstrap: [ HeroComponent ]
|
|
|
|
})
|
|
|
|
.Class({
|
|
|
|
constructor: function() {}
|
|
|
|
});
|
2016-03-16 18:01:33 +02:00
|
|
|
|
|
|
|
})(window.app = window.app || {});
|
|
|
|
// #enddocregion appexport
|