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:
@ -4,8 +4,8 @@ import "index_common.dart" show App;
|
||||
import "dart:isolate";
|
||||
import "package:angular2/platform/worker_app.dart";
|
||||
import "package:angular2/core.dart";
|
||||
import "package:angular2/platform/common.dart" show LocationStrategy, HashLocationStrategy;
|
||||
import "package:angular2/src/web_workers/worker/router_providers.dart";
|
||||
import "package:angular2/router.dart";
|
||||
|
||||
@AngularEntrypoint()
|
||||
main(List<String> args, SendPort replyTo) {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import {platform, Provider, NgZone} from "angular2/core";
|
||||
import {HashLocationStrategy, LocationStrategy} from 'angular2/platform/common';
|
||||
import {
|
||||
WORKER_APP_PLATFORM,
|
||||
WORKER_APP_APPLICATION,
|
||||
WORKER_APP_ROUTER
|
||||
} from "angular2/platform/worker_app";
|
||||
import {App} from "./index_common";
|
||||
import {HashLocationStrategy, LocationStrategy} from "angular2/router";
|
||||
|
||||
export function main() {
|
||||
let refPromise = platform([WORKER_APP_PLATFORM])
|
||||
|
@ -5,7 +5,6 @@ import {
|
||||
WORKER_SCRIPT,
|
||||
WORKER_RENDER_ROUTER
|
||||
} from 'angular2/platform/worker_render';
|
||||
import {BrowserPlatformLocation} from "angular2/src/router/location/browser_platform_location";
|
||||
import {MessageBasedPlatformLocation} from "angular2/src/web_workers/ui/platform_location";
|
||||
|
||||
let ref = platform([WORKER_RENDER_PLATFORM])
|
||||
@ -13,4 +12,4 @@ let ref = platform([WORKER_RENDER_PLATFORM])
|
||||
WORKER_RENDER_APP,
|
||||
new Provider(WORKER_SCRIPT, {useValue: "loader.js"}),
|
||||
WORKER_RENDER_ROUTER
|
||||
]);
|
||||
]);
|
||||
|
Reference in New Issue
Block a user