| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  | import {SpyLocation} from '@angular/common/testing'; | 
					
						
							|  |  |  | import {Location} from '@angular/common'; | 
					
						
							| 
									
										
										
										
											2016-05-02 10:36:58 -07:00
										 |  |  | import {Router, RouterOutletMap} from '../src/router'; | 
					
						
							| 
									
										
										
										
											2016-05-04 14:40:17 -07:00
										 |  |  | import {RouteSegment} from '../src/segments'; | 
					
						
							| 
									
										
										
										
											2016-05-02 10:36:58 -07:00
										 |  |  | import {RouterUrlSerializer, DefaultRouterUrlSerializer} from '../src/router_url_serializer'; | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  | import {Component, ComponentResolver} from '@angular/core'; | 
					
						
							| 
									
										
										
										
											2016-04-26 20:51:10 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | @Component({selector: 'fake-app-root-comp', template: `<span></span>`}) | 
					
						
							|  |  |  | class FakeAppRootCmp { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | function routerFactory(componentResolver: ComponentResolver, urlSerializer: RouterUrlSerializer, | 
					
						
							|  |  |  |                        routerOutletMap: RouterOutletMap, location: Location): Router { | 
					
						
							|  |  |  |   return new Router(null, FakeAppRootCmp, componentResolver, urlSerializer, routerOutletMap, | 
					
						
							|  |  |  |                     location); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export const ROUTER_FAKE_PROVIDERS: any[] = /*@ts2dart_const*/ [ | 
					
						
							|  |  |  |   RouterOutletMap, | 
					
						
							|  |  |  |   /* @ts2dart_Provider */ {provide: Location, useClass: SpyLocation}, | 
					
						
							|  |  |  |   /* @ts2dart_Provider */ {provide: RouterUrlSerializer, useClass: DefaultRouterUrlSerializer}, | 
					
						
							|  |  |  |   /* @ts2dart_Provider */ { | 
					
						
							|  |  |  |     provide: Router, | 
					
						
							|  |  |  |     useFactory: routerFactory, | 
					
						
							|  |  |  |     deps: /*@ts2dart_const*/ | 
					
						
							|  |  |  |         [ComponentResolver, RouterUrlSerializer, RouterOutletMap, Location] | 
					
						
							|  |  |  |   }, | 
					
						
							| 
									
										
										
										
											2016-05-04 14:40:17 -07:00
										 |  |  |   /*@ts2dart_Provider*/ {provide: RouteSegment, useFactory: (r) => r.routeTree.root, deps: [Router]} | 
					
						
							| 
									
										
										
										
											2016-04-26 20:51:10 -07:00
										 |  |  | ]; |