2016-05-18 09:53:13 -04:00
|
|
|
import { Component } from '@angular/core';
|
|
|
|
|
2016-09-27 03:58:10 -04:00
|
|
|
import { heroesUrl, mockHeroes, VILLAINS_URL } from './core';
|
2016-05-18 09:53:13 -04:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'sg-app',
|
|
|
|
template: `
|
|
|
|
<div>Heroes url: {{heroesUrl}}</div>
|
|
|
|
<div>Villains url: {{villainsUrl}}</div>
|
2016-07-07 18:27:15 -04:00
|
|
|
|
|
|
|
<h4>Mock Heroes</h4>
|
|
|
|
<div *ngFor="let hero of heroes">{{hero}}</div>
|
|
|
|
`
|
2016-05-18 09:53:13 -04:00
|
|
|
})
|
|
|
|
export class AppComponent {
|
2016-07-07 18:27:15 -04:00
|
|
|
heroes = mockHeroes; // prefer
|
|
|
|
heroesUrl = heroesUrl; // prefer
|
|
|
|
villainsUrl = VILLAINS_URL; // tolerate
|
2016-05-18 09:53:13 -04:00
|
|
|
}
|