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:
@ -23,7 +23,8 @@ const LIB_MAP = const {
|
||||
'ngCompiler': 'angular2.compiler',
|
||||
'ngCore': 'angular2.core',
|
||||
'ngInstrumentation': 'angular2.instrumentation',
|
||||
'ngPlatformBrowser': 'angular2.platform.browser'
|
||||
'ngPlatformBrowser': 'angular2.platform.browser',
|
||||
'ngPlatformCommon': 'angular2.platform.common'
|
||||
};
|
||||
|
||||
// Have this list here to trick dart to force import.
|
||||
|
@ -4,6 +4,7 @@ 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';
|
||||
import * as ngPlatformCommon from 'angular2/platform/common';
|
||||
import * as ngUpgrade from 'angular2/upgrade';
|
||||
|
||||
const LIB_MAP = {
|
||||
@ -13,6 +14,7 @@ const LIB_MAP = {
|
||||
ngCore,
|
||||
ngInstrumentation,
|
||||
ngPlatformBrowser,
|
||||
ngPlatformCommon,
|
||||
ngUpgrade
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user