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:
@@ -1,4 +1,7 @@
|
||||
import {BrowserPlatformLocation} from 'angular2/src/router/location/browser_platform_location';
|
||||
import {
|
||||
BrowserPlatformLocation
|
||||
} from 'angular2/src/platform/browser/location/browser_platform_location';
|
||||
import {UrlChangeListener} from 'angular2/platform/common';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {ROUTER_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
|
||||
import {
|
||||
@@ -10,7 +13,6 @@ import {bind} from './bind';
|
||||
import {LocationType} from 'angular2/src/web_workers/shared/serialized_types';
|
||||
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
|
||||
import {EventEmitter, ObservableWrapper, PromiseWrapper} from 'angular2/src/facade/async';
|
||||
import {UrlChangeListener} from 'angular2/src/router/location/platform_location';
|
||||
|
||||
@Injectable()
|
||||
export class MessageBasedPlatformLocation {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import {MessageBasedPlatformLocation} from './platform_location';
|
||||
import {CONST_EXPR} from 'angular2/src/facade/lang';
|
||||
import {BrowserPlatformLocation} from 'angular2/src/router/location/browser_platform_location';
|
||||
import {
|
||||
BrowserPlatformLocation
|
||||
} from 'angular2/src/platform/browser/location/browser_platform_location';
|
||||
import {APP_INITIALIZER, Provider, Injector, NgZone} from 'angular2/core';
|
||||
|
||||
export const WORKER_RENDER_ROUTER = CONST_EXPR([
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {
|
||||
PlatformLocation,
|
||||
UrlChangeEvent,
|
||||
UrlChangeListener
|
||||
} from 'angular2/src/router/location/platform_location';
|
||||
import {
|
||||
FnArg,
|
||||
UiArguments,
|
||||
ClientMessageBroker,
|
||||
ClientMessageBrokerFactory
|
||||
} from 'angular2/src/web_workers/shared/client_message_broker';
|
||||
import {PlatformLocation, UrlChangeEvent, UrlChangeListener} from 'angular2/platform/common';
|
||||
import {ROUTER_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
|
||||
import {LocationType} from 'angular2/src/web_workers/shared/serialized_types';
|
||||
import {PromiseWrapper, EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {ApplicationRef, Provider, NgZone, APP_INITIALIZER} from 'angular2/core';
|
||||
import {PlatformLocation} from 'angular2/src/router/location/platform_location';
|
||||
import {PlatformLocation} from 'angular2/platform/common';
|
||||
import {WebWorkerPlatformLocation} from './platform_location';
|
||||
import {ROUTER_PROVIDERS_COMMON} from 'angular2/src/router/router_providers_common';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user