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
This commit is contained in:
@ -311,6 +311,17 @@ var NG_PLATFORM_BROWSER = [
|
||||
'inspectNativeElement'
|
||||
];
|
||||
|
||||
var NG_PLATFORM_COMMON = [
|
||||
'APP_BASE_HREF',
|
||||
'HashLocationStrategy',
|
||||
'Location',
|
||||
'LocationStrategy',
|
||||
'PathLocationStrategy',
|
||||
'PlatformLocation',
|
||||
'UrlChangeEvent:dart',
|
||||
'UrlChangeListener:dart'
|
||||
];
|
||||
|
||||
var NG_UPGRADE = [
|
||||
'UpgradeAdapter',
|
||||
'UpgradeAdapterRef',
|
||||
@ -322,6 +333,7 @@ var NG_API = {
|
||||
ngCore: NG_CORE,
|
||||
ngInstrumentation: NG_INSTRUMENTATION,
|
||||
ngPlatformBrowser: NG_PLATFORM_BROWSER,
|
||||
ngPlatformCommon: NG_PLATFORM_COMMON,
|
||||
ngUpgrade: NG_UPGRADE
|
||||
};
|
||||
|
||||
@ -336,8 +348,15 @@ export function main() {
|
||||
*/
|
||||
|
||||
describe('public API', () => {
|
||||
var barrelList =
|
||||
['ngCommon', 'ngCompiler', 'ngCore', 'ngInstrumentation', 'ngPlatformBrowser', 'ngUpgrade'];
|
||||
var barrelList = [
|
||||
'ngCommon',
|
||||
'ngCompiler',
|
||||
'ngCore',
|
||||
'ngInstrumentation',
|
||||
'ngPlatformBrowser',
|
||||
'ngPlatformCommon',
|
||||
'ngUpgrade'
|
||||
];
|
||||
|
||||
if (IS_DART) {
|
||||
barrelList = barrelList.filter(b => b !== 'ngUpgrade');
|
||||
|
Reference in New Issue
Block a user