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