| 
									
										
										
										
											2016-05-03 14:06:32 +02:00
										 |  |  | import { Component, HostBinding } from '@angular/core'; | 
					
						
							|  |  |  | import { Hero } from './hero'; | 
					
						
							| 
									
										
										
										
											2016-04-05 09:27:10 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | // #docregion
 | 
					
						
							|  |  |  | @Component({ | 
					
						
							|  |  |  |   selector: 'hero-app', | 
					
						
							|  |  |  |   template: `
 | 
					
						
							|  |  |  |     <h1>Tour of Heroes</h1> | 
					
						
							|  |  |  |     <hero-app-main [hero]=hero></hero-app-main>`, | 
					
						
							| 
									
										
										
										
											2016-08-09 17:38:25 +01:00
										 |  |  |   styles: ['h1 { font-weight: normal; }'] | 
					
						
							| 
									
										
										
										
											2016-04-05 09:27:10 +03:00
										 |  |  | }) | 
					
						
							|  |  |  | export class HeroAppComponent { | 
					
						
							| 
									
										
										
										
											2016-05-10 00:51:23 -07:00
										 |  |  | // #enddocregion
 | 
					
						
							| 
									
										
										
										
											2016-04-05 09:27:10 +03:00
										 |  |  |   hero = new Hero( | 
					
						
							|  |  |  |     'Human Torch', | 
					
						
							|  |  |  |     ['Mister Fantastic', 'Invisible Woman', 'Thing'] | 
					
						
							| 
									
										
										
										
											2016-06-08 01:06:25 +02:00
										 |  |  |   ); | 
					
						
							| 
									
										
										
										
											2016-05-03 14:06:32 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-05 09:27:10 +03:00
										 |  |  |   @HostBinding('class') get themeClass() { | 
					
						
							|  |  |  |     return 'theme-light'; | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2016-05-10 00:51:23 -07:00
										 |  |  | // #docregion
 | 
					
						
							| 
									
										
										
										
											2016-04-05 09:27:10 +03:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2016-05-10 00:51:23 -07:00
										 |  |  | // #enddocregion
 |