2016-05-03 14:06:32 +02:00
|
|
|
|
import { Heroes } from './heroes';
|
2016-04-11 15:36:53 +03:00
|
|
|
|
|
|
|
|
|
// #docregion
|
|
|
|
|
export const heroDetailComponent = {
|
|
|
|
|
template: `
|
|
|
|
|
<h2>{{$ctrl.hero.id}}: {{$ctrl.hero.name}}</h2>
|
|
|
|
|
`,
|
2016-06-08 01:06:25 +02:00
|
|
|
|
controller: ['heroes', function(heroes: Heroes) {
|
2016-04-11 15:36:53 +03:00
|
|
|
|
this.hero = heroes.get()[0];
|
|
|
|
|
}]
|
|
|
|
|
};
|