Skip to content

Commit

Permalink
fix(compiler): remove AppRootUrl
Browse files Browse the repository at this point in the history
Related to #5815

This should not break anything because AppRootUrl wasn't actually
being used by the compiler anymore.
  • Loading branch information
jeffbcross committed Dec 12, 2015
1 parent b1b0593 commit ed2c25e
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 32 deletions.
1 change: 0 additions & 1 deletion modules/angular2/angular2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
3 changes: 1 addition & 2 deletions modules/angular2/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
export * from './src/compiler/compiler';
10 changes: 4 additions & 6 deletions modules/angular2/src/compiler/anchor_based_app_root_url.ts
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
16 changes: 0 additions & 16 deletions modules/angular2/src/compiler/app_root_url.ts

This file was deleted.

2 changes: 0 additions & 2 deletions modules/angular2/src/compiler/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -51,6 +50,5 @@ export const COMPILER_PROVIDERS: Array<Type | Provider | any[]> = CONST_EXPR([
DomElementSchemaRegistry,
new Provider(ElementSchemaRegistry, {useExisting: DomElementSchemaRegistry}),
AnchorBasedAppRootUrl,
new Provider(AppRootUrl, {useExisting: AnchorBasedAppRootUrl}),
UrlResolver
]);
2 changes: 0 additions & 2 deletions modules/angular2/src/platform/worker_app_common.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions modules/angular2/src/platform/worker_render_common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -83,7 +82,6 @@ export const WORKER_RENDER_APP_COMMON: Array<any /*Type | Provider | any[]*/> =
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,
Expand Down
2 changes: 1 addition & 1 deletion modules/angular2/web_worker/worker.ts
Original file line number Diff line number Diff line change
@@ -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';

0 comments on commit ed2c25e

Please sign in to comment.