| 
									
										
										
										
											2015-09-21 16:48:16 -07:00
										 |  |  | import * as simple_library from './simple_library'; | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  | import * as ngCommon from 'angular2/common'; | 
					
						
							|  |  |  | import * as ngCompiler from 'angular2/compiler'; | 
					
						
							|  |  |  | import * as ngCore from 'angular2/core'; | 
					
						
							|  |  |  | import * as ngInstrumentation from 'angular2/instrumentation'; | 
					
						
							|  |  |  | import * as ngPlatformBrowser from 'angular2/platform/browser'; | 
					
						
							| 
									
										
										
											
												refactor(Location): out of router and into platform/common
closes https://github.com/angular/angular/issues/4943
BREAKING CHANGE:
`Location` and other related providers have been moved out of `router` and into `platform/common`. `BrowserPlatformLocation` is not meant to be used directly however advanced configurations may use it via the following import change.
Before:
```
import {
  PlatformLocation,
  Location,
  LocationStrategy,
  HashLocationStrategy,
  PathLocationStrategy,
  APP_BASE_HREF}
from 'angular2/router';
import {BrowserPlatformLocation} from 'angular2/src/router/location/browser_platform_location';
```
After:
```
import {
  PlatformLocation,
  Location,
  LocationStrategy,
  HashLocationStrategy,
  PathLocationStrategy,
  APP_BASE_HREF}
from 'angular2/platform/common';
import {BrowserPlatformLocation} from 'angular2/src/platform/browser/location/browser_platform_location';
```
Closes #7962
											
										 
											2016-04-08 00:31:20 -07:00
										 |  |  | import * as ngPlatformCommon from 'angular2/platform/common'; | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  | import * as ngUpgrade from 'angular2/upgrade'; | 
					
						
							| 
									
										
										
										
											2015-09-21 16:48:16 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | const LIB_MAP = { | 
					
						
							|  |  |  |   'simple_library': simple_library, | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   ngCommon, | 
					
						
							|  |  |  |   ngCompiler, | 
					
						
							|  |  |  |   ngCore, | 
					
						
							|  |  |  |   ngInstrumentation, | 
					
						
							|  |  |  |   ngPlatformBrowser, | 
					
						
							| 
									
										
										
											
												refactor(Location): out of router and into platform/common
closes https://github.com/angular/angular/issues/4943
BREAKING CHANGE:
`Location` and other related providers have been moved out of `router` and into `platform/common`. `BrowserPlatformLocation` is not meant to be used directly however advanced configurations may use it via the following import change.
Before:
```
import {
  PlatformLocation,
  Location,
  LocationStrategy,
  HashLocationStrategy,
  PathLocationStrategy,
  APP_BASE_HREF}
from 'angular2/router';
import {BrowserPlatformLocation} from 'angular2/src/router/location/browser_platform_location';
```
After:
```
import {
  PlatformLocation,
  Location,
  LocationStrategy,
  HashLocationStrategy,
  PathLocationStrategy,
  APP_BASE_HREF}
from 'angular2/platform/common';
import {BrowserPlatformLocation} from 'angular2/src/platform/browser/location/browser_platform_location';
```
Closes #7962
											
										 
											2016-04-08 00:31:20 -07:00
										 |  |  |   ngPlatformCommon, | 
					
						
							| 
									
										
										
										
											2015-12-10 17:21:51 -08:00
										 |  |  |   ngUpgrade | 
					
						
							| 
									
										
										
										
											2015-09-21 16:48:16 -07:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-12 09:40:37 -07:00
										 |  |  | const IGNORE = | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       captureStackTrace: true, | 
					
						
							|  |  |  |       stackTraceLimit: true, | 
					
						
							|  |  |  |       toString: true, | 
					
						
							|  |  |  |       originalException: true, | 
					
						
							|  |  |  |       originalStack: true, | 
					
						
							|  |  |  |       wrapperMessage: true, | 
					
						
							|  |  |  |       wrapperStack: true, '@@observable': true | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2015-09-21 16:48:16 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | function collectTopLevelSymbols(prefix: string, lib: any): | 
					
						
							|  |  |  |     string[] { | 
					
						
							|  |  |  |       var symbols: string[] = []; | 
					
						
							|  |  |  |       for (var name in lib) { | 
					
						
							|  |  |  |         var symbol = `${name}`; | 
					
						
							| 
									
										
										
										
											2016-03-11 09:00:18 -08:00
										 |  |  |         symbols.push(symbol); | 
					
						
							| 
									
										
										
										
											2015-09-21 16:48:16 -07:00
										 |  |  |       } | 
					
						
							|  |  |  |       return symbols; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export function getSymbolsFromLibrary(name: string): string[] { | 
					
						
							|  |  |  |   var symbols = collectTopLevelSymbols(name, LIB_MAP[name]); | 
					
						
							|  |  |  |   symbols.sort(); | 
					
						
							|  |  |  |   return symbols; | 
					
						
							|  |  |  | } |