diff --git a/modules/angular2/angular2.dart b/modules/angular2/angular2.dart index 0712972173..6dd8a9c701 100644 --- a/modules/angular2/angular2.dart +++ b/modules/angular2/angular2.dart @@ -16,4 +16,3 @@ export 'package:angular2/src/platform/dom/dom_tokens.dart'; export 'package:angular2/src/platform/dom/dom_adapter.dart'; export 'package:angular2/src/platform/dom/events/event_manager.dart'; export 'package:angular2/src/compiler/url_resolver.dart'; -export 'package:angular2/src/compiler/app_root_url.dart'; diff --git a/modules/angular2/compiler.ts b/modules/angular2/compiler.ts index b7a776c8cc..57856c054b 100644 --- a/modules/angular2/compiler.ts +++ b/modules/angular2/compiler.ts @@ -5,5 +5,4 @@ */ export * from './src/compiler/url_resolver'; export * from './src/compiler/xhr'; -export * from './src/compiler/compiler'; -export * from './src/compiler/app_root_url'; \ No newline at end of file +export * from './src/compiler/compiler'; \ No newline at end of file diff --git a/modules/angular2/src/compiler/anchor_based_app_root_url.ts b/modules/angular2/src/compiler/anchor_based_app_root_url.ts index 7e59c0b553..c0a347de99 100644 --- a/modules/angular2/src/compiler/anchor_based_app_root_url.ts +++ b/modules/angular2/src/compiler/anchor_based_app_root_url.ts @@ -1,16 +1,14 @@ -import {AppRootUrl} from "angular2/src/compiler/app_root_url"; import {DOM} from "angular2/src/platform/dom/dom_adapter"; import {Injectable} from "angular2/src/core/di"; /** - * Extension of {@link AppRootUrl} that uses a DOM anchor tag to set the root url to - * the current page's url. + * Set the root url to the current page's url. */ @Injectable() -export class AnchorBasedAppRootUrl extends AppRootUrl { +export class AnchorBasedAppRootUrl { + value: string; constructor() { - super(""); - // compute the root url to pass to AppRootUrl + // compute the root url var a = DOM.createElement('a'); DOM.resolveAndSetHref(a, './', null); this.value = DOM.getHref(a); diff --git a/modules/angular2/src/compiler/app_root_url.ts b/modules/angular2/src/compiler/app_root_url.ts deleted file mode 100644 index 6c88be7045..0000000000 --- a/modules/angular2/src/compiler/app_root_url.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {Injectable} from 'angular2/src/core/di'; -import {isBlank} from 'angular2/src/facade/lang'; - -/** - * Specifies app root url for the application. - * - * Used by the {@link Compiler} when resolving HTML and CSS template URLs. - * - * This interface can be overridden by the application developer to create custom behavior. - * - * See {@link Compiler} - */ -@Injectable() -export class AppRootUrl { - constructor(public value: string) {} -} diff --git a/modules/angular2/src/compiler/compiler.ts b/modules/angular2/src/compiler/compiler.ts index 93e4c3e32c..4ca4311835 100644 --- a/modules/angular2/src/compiler/compiler.ts +++ b/modules/angular2/src/compiler/compiler.ts @@ -25,7 +25,6 @@ import {RuntimeCompiler} from 'angular2/src/compiler/runtime_compiler'; import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry'; import {DomElementSchemaRegistry} from 'angular2/src/compiler/schema/dom_element_schema_registry'; import {UrlResolver, DEFAULT_PACKAGE_URL_PROVIDER} from 'angular2/src/compiler/url_resolver'; -import {AppRootUrl} from 'angular2/src/compiler/app_root_url'; import {AnchorBasedAppRootUrl} from 'angular2/src/compiler/anchor_based_app_root_url'; import {Parser, Lexer} from 'angular2/src/core/change_detection/change_detection'; @@ -51,6 +50,5 @@ export const COMPILER_PROVIDERS: Array = CONST_EXPR([ DomElementSchemaRegistry, new Provider(ElementSchemaRegistry, {useExisting: DomElementSchemaRegistry}), AnchorBasedAppRootUrl, - new Provider(AppRootUrl, {useExisting: AnchorBasedAppRootUrl}), UrlResolver ]); diff --git a/modules/angular2/src/platform/worker_app_common.ts b/modules/angular2/src/platform/worker_app_common.ts index af7eadc416..fef90aaf1d 100644 --- a/modules/angular2/src/platform/worker_app_common.ts +++ b/modules/angular2/src/platform/worker_app_common.ts @@ -1,7 +1,6 @@ import {XHR} from 'angular2/src/compiler/xhr'; import {WebWorkerXHRImpl} from 'angular2/src/web_workers/worker/xhr_impl'; import {ListWrapper} from 'angular2/src/facade/collection'; -import {AppRootUrl} from 'angular2/src/compiler/app_root_url'; import {WebWorkerRenderer} from 'angular2/src/web_workers/worker/renderer'; import {print, Type, CONST_EXPR, isPresent} from 'angular2/src/facade/lang'; import {MessageBus} from 'angular2/src/web_workers/shared/message_bus'; @@ -86,7 +85,6 @@ export function genericWorkerAppProviders(bus: MessageBus, subscription = ObservableWrapper.subscribe(emitter, (initData: {[key: string]: any}) => { var bindings = ListWrapper.concat(WORKER_APP_COMMON_PROVIDERS, [ new Provider(MessageBus, {useValue: bus}), - new Provider(AppRootUrl, {useValue: new AppRootUrl(initData['rootUrl'])}), ]); bootstrapProcess.resolve(bindings); ObservableWrapper.dispose(subscription); diff --git a/modules/angular2/src/platform/worker_render_common.ts b/modules/angular2/src/platform/worker_render_common.ts index 7f950c01fe..288c071363 100644 --- a/modules/angular2/src/platform/worker_render_common.ts +++ b/modules/angular2/src/platform/worker_render_common.ts @@ -2,7 +2,6 @@ import {CONST_EXPR, IS_DART} from 'angular2/src/facade/lang'; import {MessageBus} from 'angular2/src/web_workers/shared/message_bus'; import {NgZone} from 'angular2/src/core/zone/ng_zone'; import {AnchorBasedAppRootUrl} from 'angular2/src/compiler/anchor_based_app_root_url'; -import {AppRootUrl} from 'angular2/src/compiler/app_root_url'; import { PLATFORM_DIRECTIVES, PLATFORM_PIPES, @@ -83,7 +82,6 @@ export const WORKER_RENDER_APP_COMMON: Array = new Provider(ServiceMessageBrokerFactory, {useClass: ServiceMessageBrokerFactory_}), new Provider(ClientMessageBrokerFactory, {useClass: ClientMessageBrokerFactory_}), AnchorBasedAppRootUrl, - new Provider(AppRootUrl, {useExisting: AnchorBasedAppRootUrl}), Serializer, new Provider(ON_WEB_WORKER, {useValue: false}), RenderViewWithFragmentsStore, diff --git a/modules/angular2/web_worker/worker.ts b/modules/angular2/web_worker/worker.ts index a540cff63f..a444f923ce 100644 --- a/modules/angular2/web_worker/worker.ts +++ b/modules/angular2/web_worker/worker.ts @@ -1,6 +1,6 @@ export * from '../common'; export * from '../core'; export * from '../platform/worker_app'; -export {UrlResolver, AppRootUrl} from '../compiler'; +export {UrlResolver} from '../compiler'; export * from '../instrumentation'; export * from 'angular2/src/platform/worker_app';