| 
									
										
										
										
											2016-11-12 16:06:02 +00:00
										 |  |  |  | declare var angular: angular.IAngularStatic; | 
					
						
							| 
									
										
										
										
											2016-09-27 09:22:38 +01:00
										 |  |  |  | import { NgModule } from '@angular/core'; | 
					
						
							| 
									
										
										
										
											2016-11-10 13:57:45 +00:00
										 |  |  |  | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | 
					
						
							| 
									
										
										
										
											2016-09-27 09:22:38 +01:00
										 |  |  |  | import { BrowserModule } from '@angular/platform-browser'; | 
					
						
							| 
									
										
										
										
											2016-11-10 13:57:45 +00:00
										 |  |  |  | import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static'; | 
					
						
							| 
									
										
										
										
											2016-05-03 14:06:32 +02:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-10 13:57:45 +00:00
										 |  |  |  | import { MainController } from './main.controller'; | 
					
						
							| 
									
										
										
										
											2016-05-03 14:06:32 +02:00
										 |  |  |  | import { HeroDetailComponent } from './hero-detail.component'; | 
					
						
							| 
									
										
										
										
											2015-12-31 08:46:32 +02:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-27 09:22:38 +01:00
										 |  |  |  | @NgModule({ | 
					
						
							| 
									
										
										
										
											2016-11-10 13:57:45 +00:00
										 |  |  |  |   imports: [ | 
					
						
							|  |  |  |  |     BrowserModule, | 
					
						
							|  |  |  |  |     UpgradeModule | 
					
						
							|  |  |  |  |   ], | 
					
						
							|  |  |  |  |   declarations: [ | 
					
						
							|  |  |  |  |     HeroDetailComponent | 
					
						
							|  |  |  |  |   ], | 
					
						
							|  |  |  |  |   entryComponents: [ | 
					
						
							|  |  |  |  |     HeroDetailComponent | 
					
						
							|  |  |  |  |   ] | 
					
						
							| 
									
										
										
										
											2016-09-27 09:22:38 +01:00
										 |  |  |  | }) | 
					
						
							| 
									
										
										
										
											2016-11-10 13:57:45 +00:00
										 |  |  |  | export class AppModule { | 
					
						
							|  |  |  |  |   ngDoBootstrap() {} | 
					
						
							|  |  |  |  | } | 
					
						
							| 
									
										
										
										
											2015-12-31 08:46:32 +02:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | angular.module('heroApp', []) | 
					
						
							|  |  |  |  |   .controller('MainController', MainController) | 
					
						
							| 
									
										
										
										
											2016-11-10 13:57:45 +00:00
										 |  |  |  |   .directive('heroDetail', downgradeComponent({ | 
					
						
							|  |  |  |  |     component: HeroDetailComponent, | 
					
						
							|  |  |  |  |     inputs: ['hero'] | 
					
						
							| 
									
										
										
										
											2016-11-12 16:06:02 +00:00
										 |  |  |  |   }) as angular.IDirectiveFactory); | 
					
						
							| 
									
										
										
										
											2015-12-31 08:46:32 +02:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-10 13:57:45 +00:00
										 |  |  |  | platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => { | 
					
						
							| 
									
										
										
										
											2016-11-14 19:02:54 +00:00
										 |  |  |  |   const upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule; | 
					
						
							| 
									
										
										
										
											2016-11-10 13:57:45 +00:00
										 |  |  |  |   upgrade.bootstrap(document.body, ['heroApp'], {strictDi: true}); | 
					
						
							|  |  |  |  | }); |