repackaging: all the repackaging changes squashed
This commit is contained in:
@ -4,11 +4,11 @@ import {
|
||||
RegExpWrapper,
|
||||
NumberWrapper,
|
||||
isPresent
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {Math} from 'angular2/src/facade/math';
|
||||
import {camelCaseToDashCase} from 'angular2/src/platform/dom/util';
|
||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
} from '../../src/facade/lang';
|
||||
import {Math} from '../../src/facade/math';
|
||||
import {StringMapWrapper} from '../../src/facade/collection';
|
||||
import {camelCaseToDashCase} from '../dom/util';
|
||||
import {getDOM} from '../dom/dom_adapter';
|
||||
|
||||
import {BrowserDetails} from './browser_details';
|
||||
import {CssAnimationOptions} from './css_animation_options';
|
||||
@ -50,7 +50,7 @@ export class Animation {
|
||||
constructor(public element: HTMLElement, public data: CssAnimationOptions,
|
||||
public browserDetails: BrowserDetails) {
|
||||
this.startTime = DateWrapper.toMillis(DateWrapper.now());
|
||||
this._stringPrefix = DOM.getAnimationPrefix();
|
||||
this._stringPrefix = getDOM().getAnimationPrefix();
|
||||
this.setup();
|
||||
this.wait((timestamp: any) => this.start());
|
||||
}
|
||||
@ -79,7 +79,7 @@ export class Animation {
|
||||
this.addClasses(this.data.animationClasses);
|
||||
this.removeClasses(this.data.classesToRemove);
|
||||
if (this.data.toStyles != null) this.applyStyles(this.data.toStyles);
|
||||
var computedStyles = DOM.getComputedStyle(this.element);
|
||||
var computedStyles = getDOM().getComputedStyle(this.element);
|
||||
this.computedDelay =
|
||||
Math.max(this.parseDurationString(
|
||||
computedStyles.getPropertyValue(this._stringPrefix + 'transition-delay')),
|
||||
@ -99,10 +99,10 @@ export class Animation {
|
||||
applyStyles(styles: {[key: string]: any}): void {
|
||||
StringMapWrapper.forEach(styles, (value: any, key: string) => {
|
||||
var dashCaseKey = camelCaseToDashCase(key);
|
||||
if (isPresent(DOM.getStyle(this.element, dashCaseKey))) {
|
||||
DOM.setStyle(this.element, dashCaseKey, value.toString());
|
||||
if (isPresent(getDOM().getStyle(this.element, dashCaseKey))) {
|
||||
getDOM().setStyle(this.element, dashCaseKey, value.toString());
|
||||
} else {
|
||||
DOM.setStyle(this.element, this._stringPrefix + dashCaseKey, value.toString());
|
||||
getDOM().setStyle(this.element, this._stringPrefix + dashCaseKey, value.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -112,7 +112,7 @@ export class Animation {
|
||||
* @param classes
|
||||
*/
|
||||
addClasses(classes: string[]): void {
|
||||
for (let i = 0, len = classes.length; i < len; i++) DOM.addClass(this.element, classes[i]);
|
||||
for (let i = 0, len = classes.length; i < len; i++) getDOM().addClass(this.element, classes[i]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -120,7 +120,7 @@ export class Animation {
|
||||
* @param classes
|
||||
*/
|
||||
removeClasses(classes: string[]): void {
|
||||
for (let i = 0, len = classes.length; i < len; i++) DOM.removeClass(this.element, classes[i]);
|
||||
for (let i = 0, len = classes.length; i < len; i++) getDOM().removeClass(this.element, classes[i]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -128,8 +128,8 @@ export class Animation {
|
||||
*/
|
||||
addEvents(): void {
|
||||
if (this.totalTime > 0) {
|
||||
this.eventClearFunctions.push(DOM.onAndCancel(
|
||||
this.element, DOM.getTransitionEnd(), (event: any) => this.handleAnimationEvent(event)));
|
||||
this.eventClearFunctions.push(getDOM().onAndCancel(
|
||||
this.element, getDOM().getTransitionEnd(), (event: any) => this.handleAnimationEvent(event)));
|
||||
} else {
|
||||
this.handleAnimationCompleted();
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
import {CssAnimationBuilder} from './css_animation_builder';
|
||||
import {BrowserDetails} from './browser_details';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {Math} from 'angular2/src/facade/math';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Math} from '../../src/facade/math';
|
||||
import {getDOM} from '../dom/dom_adapter';
|
||||
|
||||
@Injectable()
|
||||
export class BrowserDetails {
|
||||
@ -13,17 +13,17 @@ export class BrowserDetails {
|
||||
* time, Chrome and Opera seem to be the only browsers that include this.
|
||||
*/
|
||||
doesElapsedTimeIncludesDelay(): void {
|
||||
var div = DOM.createElement('div');
|
||||
DOM.setAttribute(div, 'style', `position: absolute; top: -9999px; left: -9999px; width: 1px;
|
||||
var div = getDOM().createElement('div');
|
||||
getDOM().setAttribute(div, 'style', `position: absolute; top: -9999px; left: -9999px; width: 1px;
|
||||
height: 1px; transition: all 1ms linear 1ms;`);
|
||||
// Firefox requires that we wait for 2 frames for some reason
|
||||
this.raf((timestamp: any) => {
|
||||
DOM.on(div, 'transitionend', (event: any) => {
|
||||
getDOM().on(div, 'transitionend', (event: any) => {
|
||||
var elapsed = Math.round(event.elapsedTime * 1000);
|
||||
this.elapsedTimeIncludesDelay = elapsed == 2;
|
||||
DOM.remove(div);
|
||||
getDOM().remove(div);
|
||||
});
|
||||
DOM.setStyle(div, 'width', '2px');
|
||||
getDOM().setStyle(div, 'width', '2px');
|
||||
}, 2);
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ class RafQueue {
|
||||
constructor(public callback: Function, public frames: number) { this._raf(); }
|
||||
private _raf() {
|
||||
this.currentFrameId =
|
||||
DOM.requestAnimationFrame((timestamp: number) => this._nextFrame(timestamp));
|
||||
getDOM().requestAnimationFrame((timestamp: number) => this._nextFrame(timestamp));
|
||||
}
|
||||
private _nextFrame(timestamp: number) {
|
||||
this.frames--;
|
||||
@ -49,7 +49,7 @@ class RafQueue {
|
||||
}
|
||||
}
|
||||
cancel() {
|
||||
DOM.cancelAnimationFrame(this.currentFrameId);
|
||||
getDOM().cancelAnimationFrame(this.currentFrameId);
|
||||
this.currentFrameId = null;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import {MapWrapper, ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {isBlank, isPresent, global, setValueOnPath, DateWrapper} from 'angular2/src/facade/lang';
|
||||
import {setRootDomAdapter} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {ListWrapper} from '../../src/facade/collection';
|
||||
import {isBlank, isPresent, global, setValueOnPath, DateWrapper} from '../../src/facade/lang';
|
||||
|
||||
import {GenericBrowserDomAdapter} from './generic_browser_adapter';
|
||||
import {setRootDomAdapter} from '../dom/dom_adapter';
|
||||
|
||||
var _attrToPropMap = {
|
||||
'class': 'className',
|
||||
|
@ -1,7 +1,6 @@
|
||||
import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {isPresent, isFunction, Type} from 'angular2/src/facade/lang';
|
||||
import {DomAdapter} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {XHRImpl} from 'angular2/src/platform/browser/xhr_impl';
|
||||
import {StringMapWrapper} from '../../src/facade/collection';
|
||||
import {isPresent, isFunction, Type} from '../../src/facade/lang';
|
||||
import {DomAdapter} from '../dom/dom_adapter';
|
||||
|
||||
|
||||
/**
|
||||
@ -42,7 +41,6 @@ export abstract class GenericBrowserDomAdapter extends DomAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
getXHR(): Type { return XHRImpl; }
|
||||
getDistributedNodes(el: HTMLElement): Node[] { return (<any>el).getDistributedNodes(); }
|
||||
resolveAndSetHref(el: HTMLAnchorElement, baseUrl: string, href: string) {
|
||||
el.href = href == null ? baseUrl : baseUrl + '/../' + href;
|
||||
|
@ -1,7 +1,9 @@
|
||||
import {Injectable} from 'angular2/src/core/di/decorators';
|
||||
import {UrlChangeListener, PlatformLocation} from './platform_location';
|
||||
import {History, Location} from 'angular2/src/facade/browser';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {History, Location} from '../../../src/facade/browser';
|
||||
import {UrlChangeListener, PlatformLocation} from '@angular/common';
|
||||
import {getDOM} from '../../dom/dom_adapter';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* `PlatformLocation` encapsulates all of the direct calls to platform APIs.
|
||||
@ -21,21 +23,21 @@ export class BrowserPlatformLocation extends PlatformLocation {
|
||||
// This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
|
||||
/** @internal */
|
||||
_init() {
|
||||
this._location = DOM.getLocation();
|
||||
this._history = DOM.getHistory();
|
||||
this._location = getDOM().getLocation();
|
||||
this._history = getDOM().getHistory();
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
get location(): Location { return this._location; }
|
||||
|
||||
getBaseHrefFromDOM(): string { return DOM.getBaseHref(); }
|
||||
getBaseHrefFromDOM(): string { return getDOM().getBaseHref(); }
|
||||
|
||||
onPopState(fn: UrlChangeListener): void {
|
||||
DOM.getGlobalEventTarget('window').addEventListener('popstate', fn, false);
|
||||
getDOM().getGlobalEventTarget('window').addEventListener('popstate', fn, false);
|
||||
}
|
||||
|
||||
onHashChange(fn: UrlChangeListener): void {
|
||||
DOM.getGlobalEventTarget('window').addEventListener('hashchange', fn, false);
|
||||
getDOM().getGlobalEventTarget('window').addEventListener('hashchange', fn, false);
|
||||
}
|
||||
|
||||
get pathname(): string { return this._location.pathname; }
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {PromiseWrapper} from 'angular2/src/facade/async';
|
||||
import {DomAdapter} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
||||
import {PromiseWrapper} from '../../src/facade/async';
|
||||
import {DomAdapter} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
import {ElementRef} from '@angular/core/src/linker/element_ref';
|
||||
|
||||
export class Rectangle {
|
||||
left;
|
||||
|
@ -126,7 +126,7 @@ class BrowserGetTestability implements GetTestability {
|
||||
}
|
||||
return _jsify(result);
|
||||
};
|
||||
js.context['getAllAngularTestabilities'] =
|
||||
js.context['getAllAngularTestabilities'] =
|
||||
_jsify(getAllAngularTestabilities);
|
||||
|
||||
var whenAllStable = _jsify((callback) {
|
||||
@ -162,10 +162,10 @@ class BrowserGetTestability implements GetTestability {
|
||||
} else if (!findInAncestors) {
|
||||
return null;
|
||||
}
|
||||
if (DOM.isShadowRoot(elem)) {
|
||||
return this.findTestabilityInTree(registry, DOM.getHost(elem), true);
|
||||
if (getDOM().isShadowRoot(elem)) {
|
||||
return this.findTestabilityInTree(registry, getDOM().getHost(elem), true);
|
||||
}
|
||||
return this.findTestabilityInTree(registry, DOM.parentElement(elem), true);
|
||||
return this.findTestabilityInTree(registry, getDOM().parentElement(elem), true);
|
||||
}
|
||||
|
||||
js.JsObject _createRegistry(TestabilityRegistry registry) {
|
||||
|
@ -1,17 +1,16 @@
|
||||
import {Map, MapWrapper, ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {global, isPresent} from 'angular2/src/facade/lang';
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
import {PromiseWrapper, ObservableWrapper} from 'angular2/src/facade/async';
|
||||
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
|
||||
import {
|
||||
Injectable,
|
||||
TestabilityRegistry,
|
||||
Testability,
|
||||
GetTestability,
|
||||
setTestabilityGetter
|
||||
} from 'angular2/core';
|
||||
} from '@angular/core';
|
||||
|
||||
import {ListWrapper} from '../../src/facade/collection';
|
||||
import {global, isPresent} from '../../src/facade/lang';
|
||||
import {getDOM} from '../dom/dom_adapter';
|
||||
|
||||
|
||||
|
||||
class PublicTestability {
|
||||
/** @internal */
|
||||
@ -82,9 +81,9 @@ export class BrowserGetTestability implements GetTestability {
|
||||
} else if (!findInAncestors) {
|
||||
return null;
|
||||
}
|
||||
if (DOM.isShadowRoot(elem)) {
|
||||
return this.findTestabilityInTree(registry, DOM.getHost(elem), true);
|
||||
if (getDOM().isShadowRoot(elem)) {
|
||||
return this.findTestabilityInTree(registry, getDOM().getHost(elem), true);
|
||||
}
|
||||
return this.findTestabilityInTree(registry, DOM.parentElement(elem), true);
|
||||
return this.findTestabilityInTree(registry, getDOM().parentElement(elem), true);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
|
||||
import {getDOM} from '../dom/dom_adapter';
|
||||
/**
|
||||
* A service that can be used to get and set the title of a current HTML document.
|
||||
*
|
||||
@ -13,11 +12,11 @@ export class Title {
|
||||
* Get the title of the current HTML document.
|
||||
* @returns {string}
|
||||
*/
|
||||
getTitle(): string { return DOM.getTitle(); }
|
||||
getTitle(): string { return getDOM().getTitle(); }
|
||||
|
||||
/**
|
||||
* Set the title of the current HTML document.
|
||||
* @param newTitle
|
||||
*/
|
||||
setTitle(newTitle: string) { DOM.setTitle(newTitle); }
|
||||
setTitle(newTitle: string) { getDOM().setTitle(newTitle); }
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {ApplicationRef} from 'angular2/src/core/application_ref';
|
||||
import {ComponentRef} from 'angular2/src/core/linker/component_factory';
|
||||
import {isPresent, NumberWrapper} from 'angular2/src/facade/lang';
|
||||
import {window} from 'angular2/src/facade/browser';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {ApplicationRef, ComponentRef} from '@angular/core';
|
||||
import {isPresent, NumberWrapper} from '../../../src/facade/lang';
|
||||
import {window} from '../../../src/facade/browser';
|
||||
import {getDOM} from '../../dom/dom_adapter';
|
||||
|
||||
|
||||
export class ChangeDetectionPerfRecord {
|
||||
constructor(public msPerTick: number, public numTicks: number) {}
|
||||
@ -51,13 +51,13 @@ export class AngularProfiler {
|
||||
if (record && isProfilerAvailable) {
|
||||
window.console.profile(profileName);
|
||||
}
|
||||
var start = DOM.performanceNow();
|
||||
var start = getDOM().performanceNow();
|
||||
var numTicks = 0;
|
||||
while (numTicks < 5 || (DOM.performanceNow() - start) < 500) {
|
||||
while (numTicks < 5 || (getDOM().performanceNow() - start) < 500) {
|
||||
this.appRef.tick();
|
||||
numTicks++;
|
||||
}
|
||||
var end = DOM.performanceNow();
|
||||
var end = getDOM().performanceNow();
|
||||
if (record && isProfilerAvailable) {
|
||||
// need to cast to <any> because type checker thinks there's no argument
|
||||
// while in fact there is:
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {global} from 'angular2/src/facade/lang';
|
||||
import {ComponentRef} from 'angular2/src/core/linker/component_factory';
|
||||
import {ComponentRef} from '@angular/core';
|
||||
import {global} from '../../../src/facade/lang';
|
||||
|
||||
import {AngularTools} from './common_tools';
|
||||
|
||||
var context = <any>global;
|
||||
|
@ -1,50 +1,42 @@
|
||||
import {IS_DART} from 'angular2/src/facade/lang';
|
||||
import {provide, Injector, OpaqueToken} from 'angular2/src/core/di';
|
||||
import {XHR} from 'angular2/src/compiler/xhr';
|
||||
import {
|
||||
Provider,
|
||||
PLATFORM_INITIALIZER,
|
||||
PLATFORM_DIRECTIVES,
|
||||
PLATFORM_PIPES,
|
||||
ComponentRef,
|
||||
ExceptionHandler,
|
||||
Reflector,
|
||||
RootRenderer,
|
||||
reflector,
|
||||
APPLICATION_COMMON_PROVIDERS,
|
||||
PLATFORM_COMMON_PROVIDERS
|
||||
} from "angular2/core";
|
||||
import {COMMON_DIRECTIVES, COMMON_PIPES, FORM_PROVIDERS} from "angular2/common";
|
||||
import {Testability} from 'angular2/src/core/testability/testability';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {DomEventsPlugin} from 'angular2/src/platform/dom/events/dom_events';
|
||||
import {KeyEventsPlugin} from 'angular2/src/platform/dom/events/key_events';
|
||||
import {DOCUMENT} from 'angular2/src/platform/dom/dom_tokens';
|
||||
import {DomRootRenderer, DomRootRenderer_} from 'angular2/src/platform/dom/dom_renderer';
|
||||
import {DomSharedStylesHost, SharedStylesHost} from 'angular2/src/platform/dom/shared_styles_host';
|
||||
import {BrowserDetails} from "angular2/src/animate/browser_details";
|
||||
import {AnimationBuilder} from "angular2/src/animate/animation_builder";
|
||||
PLATFORM_COMMON_PROVIDERS,
|
||||
OpaqueToken,
|
||||
Testability
|
||||
} from '@angular/core';
|
||||
import {wtfInit} from '../core_private';
|
||||
import {COMMON_DIRECTIVES, COMMON_PIPES, FORM_PROVIDERS} from '@angular/common';
|
||||
|
||||
import {IS_DART} from './facade/lang';
|
||||
import {BrowserDomAdapter} from './browser/browser_adapter';
|
||||
import {BrowserGetTestability} from 'angular2/src/platform/browser/testability';
|
||||
import {CachedXHR} from 'angular2/src/platform/browser/xhr_cache';
|
||||
import {wtfInit} from 'angular2/src/core/profile/wtf_init';
|
||||
import {EventManager, EVENT_MANAGER_PLUGINS} from "angular2/src/platform/dom/events/event_manager";
|
||||
import {BrowserGetTestability} from './browser/testability';
|
||||
import {getDOM} from './dom/dom_adapter';
|
||||
import {DOCUMENT} from './dom/dom_tokens';
|
||||
import {EVENT_MANAGER_PLUGINS, EventManager} from './dom/events/event_manager';
|
||||
import {DomRootRenderer, DomRootRenderer_} from './dom/dom_renderer';
|
||||
import {SharedStylesHost} from './dom/shared_styles_host';
|
||||
import {KeyEventsPlugin} from './dom/events/key_events';
|
||||
import {ELEMENT_PROBE_PROVIDERS} from './dom/debug/ng_probe';
|
||||
import {DomEventsPlugin} from './dom/events/dom_events';
|
||||
import {
|
||||
HAMMER_GESTURE_CONFIG,
|
||||
HammerGestureConfig,
|
||||
HammerGesturesPlugin
|
||||
} from 'angular2/src/platform/dom/events/hammer_gestures';
|
||||
import {ELEMENT_PROBE_PROVIDERS} from 'angular2/platform/common_dom';
|
||||
export {DOCUMENT} from 'angular2/src/platform/dom/dom_tokens';
|
||||
export {Title} from 'angular2/src/platform/browser/title';
|
||||
export {
|
||||
ELEMENT_PROBE_PROVIDERS,
|
||||
ELEMENT_PROBE_PROVIDERS_PROD_MODE,
|
||||
inspectNativeElement,
|
||||
By
|
||||
} from 'angular2/platform/common_dom';
|
||||
} from './dom/events/hammer_gestures'
|
||||
import {DomSharedStylesHost} from './dom/shared_styles_host';
|
||||
import {AnimationBuilder} from './animate/animation_builder';
|
||||
import {BrowserDetails} from './animate/browser_details';
|
||||
|
||||
export {Title} from './browser/title';
|
||||
export {BrowserDomAdapter} from './browser/browser_adapter';
|
||||
export {enableDebugTools, disableDebugTools} from 'angular2/src/platform/browser/tools/tools';
|
||||
export {HAMMER_GESTURE_CONFIG, HammerGestureConfig} from './dom/events/hammer_gestures';
|
||||
export {enableDebugTools, disableDebugTools} from './browser/tools/tools';
|
||||
export {By} from './dom/debug/by';
|
||||
|
||||
export const BROWSER_PLATFORM_MARKER =
|
||||
/*@ts2dart_const*/ new OpaqueToken('BrowserPlatformMarker');
|
||||
@ -63,11 +55,11 @@ export const BROWSER_PROVIDERS: Array<any /*Type | Provider | any[]*/> = /*@ts2d
|
||||
function _exceptionHandler(): ExceptionHandler {
|
||||
// !IS_DART is required because we must rethrow exceptions in JS,
|
||||
// but must not rethrow exceptions in Dart
|
||||
return new ExceptionHandler(DOM, !IS_DART);
|
||||
return new ExceptionHandler(getDOM(), !IS_DART);
|
||||
}
|
||||
|
||||
function _document(): any {
|
||||
return DOM.defaultDoc();
|
||||
return getDOM().defaultDoc();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,8 +90,12 @@ export const BROWSER_APP_COMMON_PROVIDERS: Array<any /*Type | Provider | any[]*/
|
||||
ELEMENT_PROBE_PROVIDERS
|
||||
];
|
||||
|
||||
export const CACHED_TEMPLATE_PROVIDER: Array<any /*Type | Provider | any[]*/> =
|
||||
/*@ts2dart_const*/[/*@ts2dart_Provider*/ {provide: XHR, useClass: CachedXHR}];
|
||||
|
||||
export {
|
||||
HAMMER_GESTURE_CONFIG,
|
||||
HammerGestureConfig
|
||||
} from '../src/dom/events/hammer_gestures'
|
||||
|
||||
|
||||
export function initDomAdapter() {
|
||||
BrowserDomAdapter.makeCurrent();
|
||||
|
@ -1,7 +1,8 @@
|
||||
import {Type, isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {Predicate} from 'angular2/src/facade/collection';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {DebugElement} from 'angular2/core';
|
||||
import {DebugElement} from '@angular/core';
|
||||
import {Type, isPresent} from '../../../src/facade/lang';
|
||||
import {Predicate} from '../../../src/facade/collection';
|
||||
import {getDOM} from '../../dom/dom_adapter';
|
||||
|
||||
|
||||
/**
|
||||
* Predicates for use with {@link DebugElement}'s query functions.
|
||||
@ -26,7 +27,7 @@ export class By {
|
||||
static css(selector: string): Predicate<DebugElement> {
|
||||
return (debugElement) => {
|
||||
return isPresent(debugElement.nativeElement) ?
|
||||
DOM.elementMatches(debugElement.nativeElement, selector) :
|
||||
getDOM().elementMatches(debugElement.nativeElement, selector) :
|
||||
false;
|
||||
};
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
import {assertionsEnabled} from 'angular2/src/facade/lang';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {DebugNode, getDebugNode} from 'angular2/src/core/debug/debug_node';
|
||||
import {DomRootRenderer} from 'angular2/src/platform/dom/dom_renderer';
|
||||
import {RootRenderer, NgZone, ApplicationRef} from 'angular2/core';
|
||||
import {DebugDomRootRenderer} from 'angular2/src/core/debug/debug_renderer';
|
||||
import {DebugNode, getDebugNode, Provider, RootRenderer, NgZone, ApplicationRef} from '@angular/core';
|
||||
import {DebugDomRootRenderer} from '../../../core_private';
|
||||
import {assertionsEnabled} from '../../facade/lang';
|
||||
import {getDOM} from '../dom_adapter';
|
||||
import {DomRootRenderer} from '../dom_renderer';
|
||||
|
||||
|
||||
const CORE_TOKENS = /*@ts2dart_const*/ {'ApplicationRef': ApplicationRef, 'NgZone': NgZone};
|
||||
|
||||
@ -27,8 +27,8 @@ function _createConditionalRootRenderer(rootRenderer) {
|
||||
}
|
||||
|
||||
function _createRootRenderer(rootRenderer) {
|
||||
DOM.setGlobalVar(INSPECT_GLOBAL_NAME, inspectNativeElement);
|
||||
DOM.setGlobalVar(CORE_TOKENS_GLOBAL_NAME, CORE_TOKENS);
|
||||
getDOM().setGlobalVar(INSPECT_GLOBAL_NAME, inspectNativeElement);
|
||||
getDOM().setGlobalVar(CORE_TOKENS_GLOBAL_NAME, CORE_TOKENS);
|
||||
return new DebugDomRootRenderer(rootRenderer);
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,18 @@
|
||||
import {isBlank, Type} from 'angular2/src/facade/lang';
|
||||
import {isBlank, Type} from '../../src/facade/lang';
|
||||
|
||||
export var DOM: DomAdapter = null;
|
||||
var _DOM: DomAdapter = null;
|
||||
|
||||
export function getDOM(){
|
||||
return _DOM;
|
||||
}
|
||||
|
||||
export function setDOM(adapter:DomAdapter){
|
||||
_DOM = adapter;
|
||||
}
|
||||
|
||||
export function setRootDomAdapter(adapter: DomAdapter) {
|
||||
if (isBlank(DOM)) {
|
||||
DOM = adapter;
|
||||
if (isBlank(_DOM)) {
|
||||
_DOM = adapter;
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +21,7 @@ export function setRootDomAdapter(adapter: DomAdapter) {
|
||||
* Provides DOM operations in an environment-agnostic way.
|
||||
*/
|
||||
export abstract class DomAdapter {
|
||||
public xhrType: Type = null;
|
||||
abstract hasProperty(element, name: string): boolean;
|
||||
abstract setProperty(el: Element, name: string, value: any);
|
||||
abstract getProperty(el: Element, name: string): any;
|
||||
@ -24,7 +33,7 @@ export abstract class DomAdapter {
|
||||
abstract logGroupEnd();
|
||||
|
||||
/** @deprecated */
|
||||
abstract getXHR(): Type;
|
||||
getXHR(): Type { return this.xhrType; }
|
||||
|
||||
/**
|
||||
* Maps attribute names to their corresponding property names for cases
|
||||
|
@ -1,5 +1,14 @@
|
||||
import {Inject, Injectable, OpaqueToken} from 'angular2/src/core/di';
|
||||
import {AnimationBuilder} from 'angular2/src/animate/animation_builder';
|
||||
import {
|
||||
Inject,
|
||||
Injectable,
|
||||
OpaqueToken,
|
||||
Renderer,
|
||||
RootRenderer,
|
||||
RenderComponentType,
|
||||
ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
import {RenderDebugInfo} from '../../core_private'
|
||||
import {AnimationBuilder} from '../animate/animation_builder';
|
||||
import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
@ -9,23 +18,13 @@ import {
|
||||
StringWrapper,
|
||||
isArray,
|
||||
isString
|
||||
} from 'angular2/src/facade/lang';
|
||||
} from '../../src/facade/lang';
|
||||
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
import {DomSharedStylesHost} from './shared_styles_host';
|
||||
|
||||
import {
|
||||
Renderer,
|
||||
RootRenderer,
|
||||
RenderComponentType,
|
||||
RenderDebugInfo
|
||||
} from 'angular2/src/core/render/api';
|
||||
|
||||
import {EventManager} from './events/event_manager';
|
||||
|
||||
import {DOCUMENT} from './dom_tokens';
|
||||
import {ViewEncapsulation} from 'angular2/src/core/metadata';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {getDOM} from './dom_adapter';
|
||||
import {camelCaseToDashCase} from './util';
|
||||
|
||||
const NAMESPACE_URIS =
|
||||
@ -80,27 +79,27 @@ export class DomRenderer implements Renderer {
|
||||
selectRootElement(selectorOrNode: string | any, debugInfo: RenderDebugInfo): Element {
|
||||
var el;
|
||||
if (isString(selectorOrNode)) {
|
||||
el = DOM.querySelector(this._rootRenderer.document, selectorOrNode);
|
||||
el = getDOM().querySelector(this._rootRenderer.document, selectorOrNode);
|
||||
if (isBlank(el)) {
|
||||
throw new BaseException(`The selector "${selectorOrNode}" did not match any elements`);
|
||||
}
|
||||
} else {
|
||||
el = selectorOrNode;
|
||||
}
|
||||
DOM.clearNodes(el);
|
||||
getDOM().clearNodes(el);
|
||||
return el;
|
||||
}
|
||||
|
||||
createElement(parent: Element, name: string, debugInfo: RenderDebugInfo): Node {
|
||||
var nsAndName = splitNamespace(name);
|
||||
var el = isPresent(nsAndName[0]) ?
|
||||
DOM.createElementNS(NAMESPACE_URIS[nsAndName[0]], nsAndName[1]) :
|
||||
DOM.createElement(nsAndName[1]);
|
||||
getDOM().createElementNS(NAMESPACE_URIS[nsAndName[0]], nsAndName[1]) :
|
||||
getDOM().createElement(nsAndName[1]);
|
||||
if (isPresent(this._contentAttr)) {
|
||||
DOM.setAttribute(el, this._contentAttr, '');
|
||||
getDOM().setAttribute(el, this._contentAttr, '');
|
||||
}
|
||||
if (isPresent(parent)) {
|
||||
DOM.appendChild(parent, el);
|
||||
getDOM().appendChild(parent, el);
|
||||
}
|
||||
return el;
|
||||
}
|
||||
@ -108,14 +107,14 @@ export class DomRenderer implements Renderer {
|
||||
createViewRoot(hostElement: any): any {
|
||||
var nodesParent;
|
||||
if (this.componentProto.encapsulation === ViewEncapsulation.Native) {
|
||||
nodesParent = DOM.createShadowRoot(hostElement);
|
||||
nodesParent = getDOM().createShadowRoot(hostElement);
|
||||
this._rootRenderer.sharedStylesHost.addHost(nodesParent);
|
||||
for (var i = 0; i < this._styles.length; i++) {
|
||||
DOM.appendChild(nodesParent, DOM.createStyleElement(this._styles[i]));
|
||||
getDOM().appendChild(nodesParent, getDOM().createStyleElement(this._styles[i]));
|
||||
}
|
||||
} else {
|
||||
if (isPresent(this._hostAttr)) {
|
||||
DOM.setAttribute(hostElement, this._hostAttr, '');
|
||||
getDOM().setAttribute(hostElement, this._hostAttr, '');
|
||||
}
|
||||
nodesParent = hostElement;
|
||||
}
|
||||
@ -123,17 +122,17 @@ export class DomRenderer implements Renderer {
|
||||
}
|
||||
|
||||
createTemplateAnchor(parentElement: any, debugInfo: RenderDebugInfo): any {
|
||||
var comment = DOM.createComment(TEMPLATE_COMMENT_TEXT);
|
||||
var comment = getDOM().createComment(TEMPLATE_COMMENT_TEXT);
|
||||
if (isPresent(parentElement)) {
|
||||
DOM.appendChild(parentElement, comment);
|
||||
getDOM().appendChild(parentElement, comment);
|
||||
}
|
||||
return comment;
|
||||
}
|
||||
|
||||
createText(parentElement: any, value: string, debugInfo: RenderDebugInfo): any {
|
||||
var node = DOM.createTextNode(value);
|
||||
var node = getDOM().createTextNode(value);
|
||||
if (isPresent(parentElement)) {
|
||||
DOM.appendChild(parentElement, node);
|
||||
getDOM().appendChild(parentElement, node);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
@ -151,14 +150,14 @@ export class DomRenderer implements Renderer {
|
||||
detachView(viewRootNodes: any[]) {
|
||||
for (var i = 0; i < viewRootNodes.length; i++) {
|
||||
var node = viewRootNodes[i];
|
||||
DOM.remove(node);
|
||||
getDOM().remove(node);
|
||||
this.animateNodeLeave(node);
|
||||
}
|
||||
}
|
||||
|
||||
destroyView(hostElement: any, viewAllNodes: any[]) {
|
||||
if (this.componentProto.encapsulation === ViewEncapsulation.Native && isPresent(hostElement)) {
|
||||
this._rootRenderer.sharedStylesHost.removeHost(DOM.getShadowRoot(hostElement));
|
||||
this._rootRenderer.sharedStylesHost.removeHost(getDOM().getShadowRoot(hostElement));
|
||||
}
|
||||
}
|
||||
|
||||
@ -173,7 +172,7 @@ export class DomRenderer implements Renderer {
|
||||
}
|
||||
|
||||
setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void {
|
||||
DOM.setProperty(renderElement, propertyName, propertyValue);
|
||||
getDOM().setProperty(renderElement, propertyName, propertyValue);
|
||||
}
|
||||
|
||||
setElementAttribute(renderElement: any, attributeName: string, attributeValue: string): void {
|
||||
@ -185,27 +184,27 @@ export class DomRenderer implements Renderer {
|
||||
}
|
||||
if (isPresent(attributeValue)) {
|
||||
if (isPresent(attrNs)) {
|
||||
DOM.setAttributeNS(renderElement, attrNs, attributeName, attributeValue);
|
||||
getDOM().setAttributeNS(renderElement, attrNs, attributeName, attributeValue);
|
||||
} else {
|
||||
DOM.setAttribute(renderElement, attributeName, attributeValue);
|
||||
getDOM().setAttribute(renderElement, attributeName, attributeValue);
|
||||
}
|
||||
} else {
|
||||
if (isPresent(attrNs)) {
|
||||
DOM.removeAttributeNS(renderElement, attrNs, nsAndName[1]);
|
||||
getDOM().removeAttributeNS(renderElement, attrNs, nsAndName[1]);
|
||||
} else {
|
||||
DOM.removeAttribute(renderElement, attributeName);
|
||||
getDOM().removeAttribute(renderElement, attributeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setBindingDebugInfo(renderElement: any, propertyName: string, propertyValue: string): void {
|
||||
var dashCasedPropertyName = camelCaseToDashCase(propertyName);
|
||||
if (DOM.isCommentNode(renderElement)) {
|
||||
if (getDOM().isCommentNode(renderElement)) {
|
||||
var existingBindings = RegExpWrapper.firstMatch(
|
||||
TEMPLATE_BINDINGS_EXP, StringWrapper.replaceAll(DOM.getText(renderElement), /\n/g, ''));
|
||||
TEMPLATE_BINDINGS_EXP, StringWrapper.replaceAll(getDOM().getText(renderElement), /\n/g, ''));
|
||||
var parsedBindings = Json.parse(existingBindings[1]);
|
||||
parsedBindings[dashCasedPropertyName] = propertyValue;
|
||||
DOM.setText(renderElement, StringWrapper.replace(TEMPLATE_COMMENT_TEXT, '{}',
|
||||
getDOM().setText(renderElement, StringWrapper.replace(TEMPLATE_COMMENT_TEXT, '{}',
|
||||
Json.stringify(parsedBindings)));
|
||||
} else {
|
||||
this.setElementAttribute(renderElement, propertyName, propertyValue);
|
||||
@ -214,37 +213,37 @@ export class DomRenderer implements Renderer {
|
||||
|
||||
setElementClass(renderElement: any, className: string, isAdd: boolean): void {
|
||||
if (isAdd) {
|
||||
DOM.addClass(renderElement, className);
|
||||
getDOM().addClass(renderElement, className);
|
||||
} else {
|
||||
DOM.removeClass(renderElement, className);
|
||||
getDOM().removeClass(renderElement, className);
|
||||
}
|
||||
}
|
||||
|
||||
setElementStyle(renderElement: any, styleName: string, styleValue: string): void {
|
||||
if (isPresent(styleValue)) {
|
||||
DOM.setStyle(renderElement, styleName, stringify(styleValue));
|
||||
getDOM().setStyle(renderElement, styleName, stringify(styleValue));
|
||||
} else {
|
||||
DOM.removeStyle(renderElement, styleName);
|
||||
getDOM().removeStyle(renderElement, styleName);
|
||||
}
|
||||
}
|
||||
|
||||
invokeElementMethod(renderElement: any, methodName: string, args: any[]): void {
|
||||
DOM.invoke(renderElement, methodName, args);
|
||||
getDOM().invoke(renderElement, methodName, args);
|
||||
}
|
||||
|
||||
setText(renderNode: any, text: string): void { DOM.setText(renderNode, text); }
|
||||
setText(renderNode: any, text: string): void { getDOM().setText(renderNode, text); }
|
||||
|
||||
/**
|
||||
* Performs animations if necessary
|
||||
* @param node
|
||||
*/
|
||||
animateNodeEnter(node: Node) {
|
||||
if (DOM.isElementNode(node) && DOM.hasClass(node, 'ng-animate')) {
|
||||
DOM.addClass(node, 'ng-enter');
|
||||
if (getDOM().isElementNode(node) && getDOM().hasClass(node, 'ng-animate')) {
|
||||
getDOM().addClass(node, 'ng-enter');
|
||||
this._rootRenderer.animate.css()
|
||||
.addAnimationClass('ng-enter-active')
|
||||
.start(<HTMLElement>node)
|
||||
.onComplete(() => { DOM.removeClass(node, 'ng-enter'); });
|
||||
.onComplete(() => { getDOM().removeClass(node, 'ng-enter'); });
|
||||
}
|
||||
}
|
||||
|
||||
@ -255,32 +254,32 @@ export class DomRenderer implements Renderer {
|
||||
* @param node
|
||||
*/
|
||||
animateNodeLeave(node: Node) {
|
||||
if (DOM.isElementNode(node) && DOM.hasClass(node, 'ng-animate')) {
|
||||
DOM.addClass(node, 'ng-leave');
|
||||
if (getDOM().isElementNode(node) && getDOM().hasClass(node, 'ng-animate')) {
|
||||
getDOM().addClass(node, 'ng-leave');
|
||||
this._rootRenderer.animate.css()
|
||||
.addAnimationClass('ng-leave-active')
|
||||
.start(<HTMLElement>node)
|
||||
.onComplete(() => {
|
||||
DOM.removeClass(node, 'ng-leave');
|
||||
DOM.remove(node);
|
||||
getDOM().removeClass(node, 'ng-leave');
|
||||
getDOM().remove(node);
|
||||
});
|
||||
} else {
|
||||
DOM.remove(node);
|
||||
getDOM().remove(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function moveNodesAfterSibling(sibling, nodes) {
|
||||
var parent = DOM.parentElement(sibling);
|
||||
var parent = getDOM().parentElement(sibling);
|
||||
if (nodes.length > 0 && isPresent(parent)) {
|
||||
var nextSibling = DOM.nextSibling(sibling);
|
||||
var nextSibling = getDOM().nextSibling(sibling);
|
||||
if (isPresent(nextSibling)) {
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
DOM.insertBefore(nextSibling, nodes[i]);
|
||||
getDOM().insertBefore(nextSibling, nodes[i]);
|
||||
}
|
||||
} else {
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
DOM.appendChild(parent, nodes[i]);
|
||||
getDOM().appendChild(parent, nodes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -288,7 +287,7 @@ function moveNodesAfterSibling(sibling, nodes) {
|
||||
|
||||
function appendNodes(parent, nodes) {
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
DOM.appendChild(parent, nodes[i]);
|
||||
getDOM().appendChild(parent, nodes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -297,7 +296,7 @@ function decoratePreventDefault(eventHandler: Function): Function {
|
||||
var allowDefaultBehavior = eventHandler(event);
|
||||
if (allowDefaultBehavior === false) {
|
||||
// TODO(tbosch): move preventDefault into event plugins...
|
||||
DOM.preventDefault(event);
|
||||
getDOM().preventDefault(event);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {OpaqueToken} from 'angular2/src/core/di';
|
||||
import {OpaqueToken} from '@angular/core';
|
||||
|
||||
/**
|
||||
* A DI Token representing the main rendering context. In a browser this is the DOM Document.
|
||||
|
@ -1,6 +1,7 @@
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {EventManagerPlugin, EventManager} from './event_manager';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
import {getDOM} from '../dom_adapter';
|
||||
import {EventManagerPlugin} from './event_manager';
|
||||
|
||||
@Injectable()
|
||||
export class DomEventsPlugin extends EventManagerPlugin {
|
||||
@ -12,14 +13,14 @@ export class DomEventsPlugin extends EventManagerPlugin {
|
||||
var zone = this.manager.getZone();
|
||||
var outsideHandler = (event) => zone.runGuarded(() => handler(event));
|
||||
return this.manager.getZone().runOutsideAngular(
|
||||
() => DOM.onAndCancel(element, eventName, outsideHandler));
|
||||
() => getDOM().onAndCancel(element, eventName, outsideHandler));
|
||||
}
|
||||
|
||||
addGlobalEventListener(target: string, eventName: string, handler: Function): Function {
|
||||
var element = DOM.getGlobalEventTarget(target);
|
||||
var element = getDOM().getGlobalEventTarget(target);
|
||||
var zone = this.manager.getZone();
|
||||
var outsideHandler = (event) => zone.runGuarded(() => handler(event));
|
||||
return this.manager.getZone().runOutsideAngular(
|
||||
() => DOM.onAndCancel(element, eventName, outsideHandler));
|
||||
() => getDOM().onAndCancel(element, eventName, outsideHandler));
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
import {Injectable, Inject, OpaqueToken} from 'angular2/src/core/di';
|
||||
import {NgZone} from 'angular2/src/core/zone/ng_zone';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {Injectable, Inject, OpaqueToken, NgZone} from '@angular/core';
|
||||
|
||||
import {BaseException} from '../../../src/facade/exceptions';
|
||||
import {ListWrapper} from '../../../src/facade/collection';
|
||||
|
||||
|
||||
export const EVENT_MANAGER_PLUGINS: OpaqueToken =
|
||||
/*@ts2dart_const*/ new OpaqueToken("EventManagerPlugins");
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {EventManagerPlugin} from './event_manager';
|
||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {StringMapWrapper} from '../../../src/facade/collection';
|
||||
|
||||
var _eventNames = {
|
||||
// pan
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {Injectable, Inject, OpaqueToken} from '@angular/core';
|
||||
import {isPresent} from '../../../src/facade/lang';
|
||||
import {BaseException} from '../../../src/facade/exceptions';
|
||||
import {HammerGesturesPluginCommon} from './hammer_common';
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
import {Injectable, Inject, OpaqueToken} from 'angular2/core';
|
||||
|
||||
export const HAMMER_GESTURE_CONFIG: OpaqueToken =
|
||||
/*@ts2dart_const*/ new OpaqueToken("HammerGestureConfig");
|
||||
|
@ -1,15 +1,13 @@
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {NgZone, Injectable} from '@angular/core';
|
||||
import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
StringWrapper,
|
||||
RegExpWrapper,
|
||||
NumberWrapper
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {StringMapWrapper, ListWrapper} from 'angular2/src/facade/collection';
|
||||
} from '../../../src/facade/lang';
|
||||
import {StringMapWrapper, ListWrapper} from '../../../src/facade/collection';
|
||||
|
||||
import {getDOM} from '../dom_adapter';
|
||||
import {EventManagerPlugin} from './event_manager';
|
||||
import {NgZone} from 'angular2/src/core/zone/ng_zone';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
|
||||
|
||||
var modifierKeys = ['alt', 'control', 'meta', 'shift'];
|
||||
var modifierKeyGetters: {[key: string]: (event: KeyboardEvent) => boolean} = {
|
||||
@ -34,7 +32,7 @@ export class KeyEventsPlugin extends EventManagerPlugin {
|
||||
element, StringMapWrapper.get(parsedEvent, 'fullKey'), handler, this.manager.getZone());
|
||||
|
||||
return this.manager.getZone().runOutsideAngular(() => {
|
||||
return DOM.onAndCancel(element, StringMapWrapper.get(parsedEvent, 'domEventName'),
|
||||
return getDOM().onAndCancel(element, StringMapWrapper.get(parsedEvent, 'domEventName'),
|
||||
outsideHandler);
|
||||
});
|
||||
}
|
||||
@ -72,7 +70,7 @@ export class KeyEventsPlugin extends EventManagerPlugin {
|
||||
|
||||
static getEventFullKey(event: KeyboardEvent): string {
|
||||
var fullKey = '';
|
||||
var key = DOM.getEventKey(event);
|
||||
var key = getDOM().getEventKey(event);
|
||||
key = key.toLowerCase();
|
||||
if (StringWrapper.equals(key, ' ')) {
|
||||
key = 'space'; // for readability
|
||||
|
@ -1,6 +1,7 @@
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {Inject, Injectable} from 'angular2/src/core/di';
|
||||
import {SetWrapper} from 'angular2/src/facade/collection';
|
||||
import {Inject, Injectable} from '@angular/core';
|
||||
import {SetWrapper} from '../../src/facade/collection';
|
||||
|
||||
import {getDOM} from './dom_adapter';
|
||||
import {DOCUMENT} from './dom_tokens';
|
||||
|
||||
@Injectable()
|
||||
@ -40,7 +41,7 @@ export class DomSharedStylesHost extends SharedStylesHost {
|
||||
_addStylesToHost(styles: string[], host: Node) {
|
||||
for (var i = 0; i < styles.length; i++) {
|
||||
var style = styles[i];
|
||||
DOM.appendChild(host, DOM.createStyleElement(style));
|
||||
getDOM().appendChild(host, getDOM().createStyleElement(style));
|
||||
}
|
||||
}
|
||||
addHost(hostNode: Node) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {StringWrapper} from 'angular2/src/facade/lang';
|
||||
import {StringWrapper} from '../../src/facade/lang';
|
||||
|
||||
var CAMEL_CASE_REGEXP = /([A-Z])/g;
|
||||
var DASH_CASE_REGEXP = /-([a-z])/g;
|
||||
|
1
modules/@angular/platform-browser/src/facade
Symbolic link
1
modules/@angular/platform-browser/src/facade
Symbolic link
@ -0,0 +1 @@
|
||||
../../facade/src
|
@ -1,48 +1,39 @@
|
||||
export * from 'angular2/src/core/angular_entrypoint';
|
||||
export {
|
||||
BROWSER_PROVIDERS,
|
||||
CACHED_TEMPLATE_PROVIDER,
|
||||
ELEMENT_PROBE_PROVIDERS,
|
||||
ELEMENT_PROBE_PROVIDERS_PROD_MODE,
|
||||
inspectNativeElement,
|
||||
BrowserDomAdapter,
|
||||
By,
|
||||
Title,
|
||||
DOCUMENT,
|
||||
enableDebugTools,
|
||||
disableDebugTools
|
||||
} from 'angular2/src/platform/browser_common';
|
||||
|
||||
import {Type, isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {
|
||||
BROWSER_PROVIDERS,
|
||||
BROWSER_APP_COMMON_PROVIDERS,
|
||||
BROWSER_PLATFORM_MARKER
|
||||
} from 'angular2/src/platform/browser_common';
|
||||
import {COMPILER_PROVIDERS} from 'angular2/compiler';
|
||||
import {
|
||||
ComponentRef,
|
||||
coreLoadAndBootstrap,
|
||||
reflector,
|
||||
ReflectiveInjector,
|
||||
PlatformRef,
|
||||
OpaqueToken,
|
||||
getPlatform,
|
||||
createPlatform,
|
||||
assertPlatform
|
||||
} from 'angular2/core';
|
||||
import {ReflectionCapabilities} from 'angular2/src/core/reflection/reflection_capabilities';
|
||||
import {XHRImpl} from "angular2/src/platform/browser/xhr_impl";
|
||||
import {XHR} from 'angular2/compiler';
|
||||
} from '@angular/core';
|
||||
import {isBlank} from './facade/lang';
|
||||
import {BROWSER_PROVIDERS, BROWSER_PLATFORM_MARKER} from './browser_common';
|
||||
export {DomEventsPlugin} from './dom/events/dom_events';
|
||||
|
||||
/**
|
||||
* An array of providers that should be passed into `application()` when bootstrapping a component.
|
||||
*/
|
||||
export const BROWSER_APP_PROVIDERS: Array<any /*Type | Provider | any[]*/> = /*@ts2dart_const*/[
|
||||
export {EventManager, EVENT_MANAGER_PLUGINS} from './dom/events/event_manager';
|
||||
export {ELEMENT_PROBE_PROVIDERS} from './dom/debug/ng_probe';
|
||||
export {
|
||||
BROWSER_APP_COMMON_PROVIDERS,
|
||||
COMPILER_PROVIDERS,
|
||||
/*@ts2dart_Provider*/ {provide: XHR, useClass: XHRImpl},
|
||||
];
|
||||
BROWSER_PROVIDERS,
|
||||
By,
|
||||
Title,
|
||||
enableDebugTools,
|
||||
disableDebugTools,
|
||||
HAMMER_GESTURE_CONFIG,
|
||||
HammerGestureConfig
|
||||
} from './browser_common';
|
||||
|
||||
export * from '../private_export';
|
||||
export {DOCUMENT} from './dom/dom_tokens';
|
||||
|
||||
|
||||
export {
|
||||
bootstrapStatic,
|
||||
browserStaticPlatform,
|
||||
BROWSER_APP_STATIC_PROVIDERS,
|
||||
BrowserPlatformLocation
|
||||
} from './platform_browser_static';
|
||||
|
||||
|
||||
|
||||
export function browserPlatform(): PlatformRef {
|
||||
if (isBlank(getPlatform())) {
|
||||
@ -50,81 +41,3 @@ export function browserPlatform(): PlatformRef {
|
||||
}
|
||||
return assertPlatform(BROWSER_PLATFORM_MARKER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrapping for Angular applications.
|
||||
*
|
||||
* You instantiate an Angular application by explicitly specifying a component to use
|
||||
* as the root component for your application via the `bootstrap()` method.
|
||||
*
|
||||
* ## Simple Example
|
||||
*
|
||||
* Assuming this `index.html`:
|
||||
*
|
||||
* ```html
|
||||
* <html>
|
||||
* <!-- load Angular script tags here. -->
|
||||
* <body>
|
||||
* <my-app>loading...</my-app>
|
||||
* </body>
|
||||
* </html>
|
||||
* ```
|
||||
*
|
||||
* An application is bootstrapped inside an existing browser DOM, typically `index.html`.
|
||||
* Unlike Angular 1, Angular 2 does not compile/process providers in `index.html`. This is
|
||||
* mainly for security reasons, as well as architectural changes in Angular 2. This means
|
||||
* that `index.html` can safely be processed using server-side technologies such as
|
||||
* providers. Bindings can thus use double-curly `{{ syntax }}` without collision from
|
||||
* Angular 2 component double-curly `{{ syntax }}`.
|
||||
*
|
||||
* We can use this script code:
|
||||
*
|
||||
* {@example core/ts/bootstrap/bootstrap.ts region='bootstrap'}
|
||||
*
|
||||
* When the app developer invokes `bootstrap()` with the root component `MyApp` as its
|
||||
* argument, Angular performs the following tasks:
|
||||
*
|
||||
* 1. It uses the component's `selector` property to locate the DOM element which needs
|
||||
* to be upgraded into the angular component.
|
||||
* 2. It creates a new child injector (from the platform injector). Optionally, you can
|
||||
* also override the injector configuration for an app by invoking `bootstrap` with the
|
||||
* `componentInjectableBindings` argument.
|
||||
* 3. It creates a new `Zone` and connects it to the angular application's change detection
|
||||
* domain instance.
|
||||
* 4. It creates an emulated or shadow DOM on the selected component's host element and loads the
|
||||
* template into it.
|
||||
* 5. It instantiates the specified component.
|
||||
* 6. Finally, Angular performs change detection to apply the initial data providers for the
|
||||
* application.
|
||||
*
|
||||
*
|
||||
* ## Bootstrapping Multiple Applications
|
||||
*
|
||||
* When working within a browser window, there are many singleton resources: cookies, title,
|
||||
* location, and others. Angular services that represent these resources must likewise be
|
||||
* shared across all Angular applications that occupy the same browser window. For this
|
||||
* reason, Angular creates exactly one global platform object which stores all shared
|
||||
* services, and each angular application injector has the platform injector as its parent.
|
||||
*
|
||||
* Each application has its own private injector as well. When there are multiple
|
||||
* applications on a page, Angular treats each application injector's services as private
|
||||
* to that application.
|
||||
*
|
||||
* ## API
|
||||
*
|
||||
* - `appComponentType`: The root component which should act as the application. This is
|
||||
* a reference to a `Type` which is annotated with `@Component(...)`.
|
||||
* - `customProviders`: An additional set of providers that can be added to the
|
||||
* app injector to override default injection behavior.
|
||||
*
|
||||
* Returns a `Promise` of {@link ComponentRef}.
|
||||
*/
|
||||
export function bootstrap(
|
||||
appComponentType: Type,
|
||||
customProviders?: Array<any /*Type | Provider | any[]*/>): Promise<ComponentRef<any>> {
|
||||
reflector.reflectionCapabilities = new ReflectionCapabilities();
|
||||
var appInjector = ReflectiveInjector.resolveAndCreate(
|
||||
[BROWSER_APP_PROVIDERS, isPresent(customProviders) ? customProviders : []],
|
||||
browserPlatform().injector);
|
||||
return coreLoadAndBootstrap(appInjector, appComponentType);
|
||||
}
|
||||
|
@ -1,22 +1,3 @@
|
||||
export * from 'angular2/src/core/angular_entrypoint';
|
||||
export {
|
||||
BROWSER_PROVIDERS,
|
||||
ELEMENT_PROBE_PROVIDERS,
|
||||
ELEMENT_PROBE_PROVIDERS_PROD_MODE,
|
||||
inspectNativeElement,
|
||||
BrowserDomAdapter,
|
||||
By,
|
||||
Title,
|
||||
enableDebugTools,
|
||||
disableDebugTools
|
||||
} from 'angular2/src/platform/browser_common';
|
||||
|
||||
import {Type, isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {
|
||||
BROWSER_PROVIDERS,
|
||||
BROWSER_APP_COMMON_PROVIDERS,
|
||||
BROWSER_PLATFORM_MARKER
|
||||
} from 'angular2/src/platform/browser_common';
|
||||
import {
|
||||
ComponentRef,
|
||||
coreLoadAndBootstrap,
|
||||
@ -25,14 +6,26 @@ import {
|
||||
getPlatform,
|
||||
createPlatform,
|
||||
assertPlatform
|
||||
} from 'angular2/core';
|
||||
} from '@angular/core';
|
||||
|
||||
import {Type, isPresent, isBlank} from './facade/lang';
|
||||
import {BROWSER_APP_COMMON_PROVIDERS, BROWSER_PROVIDERS, BROWSER_PLATFORM_MARKER} from './browser_common';
|
||||
export {ELEMENT_PROBE_PROVIDERS} from './dom/debug/ng_probe';
|
||||
export {BrowserPlatformLocation} from './browser/location/browser_platform_location';
|
||||
export {
|
||||
BROWSER_PROVIDERS,
|
||||
By,
|
||||
Title,
|
||||
enableDebugTools,
|
||||
disableDebugTools,
|
||||
} from './browser_common';
|
||||
|
||||
/**
|
||||
* An array of providers that should be passed into `application()` when bootstrapping a component
|
||||
* when all templates
|
||||
* have been precompiled offline.
|
||||
*/
|
||||
export const BROWSER_APP_PROVIDERS: Array<any /*Type | Provider | any[]*/> =
|
||||
export const BROWSER_APP_STATIC_PROVIDERS: Array<any /*Type | Provider | any[]*/> =
|
||||
/*@ts2dart_const*/ BROWSER_APP_COMMON_PROVIDERS;
|
||||
|
||||
export function browserStaticPlatform(): PlatformRef {
|
||||
@ -53,7 +46,7 @@ export function bootstrapStatic(appComponentType: Type,
|
||||
}
|
||||
|
||||
let appProviders =
|
||||
isPresent(customProviders) ? [BROWSER_APP_PROVIDERS, customProviders] : BROWSER_APP_PROVIDERS;
|
||||
isPresent(customProviders) ? [BROWSER_APP_STATIC_PROVIDERS, customProviders] : BROWSER_APP_STATIC_PROVIDERS;
|
||||
var appInjector =
|
||||
ReflectiveInjector.resolveAndCreate(appProviders, browserStaticPlatform().injector);
|
||||
return coreLoadAndBootstrap(appInjector, appComponentType);
|
||||
|
@ -1,3 +1,3 @@
|
||||
import {OpaqueToken} from "angular2/src/core/di";
|
||||
import {OpaqueToken} from '@angular/core/src/di';
|
||||
|
||||
export const ON_WEB_WORKER = /*@ts2dart_const*/ new OpaqueToken('WebWorker.onWebWorker');
|
||||
|
@ -1,22 +1,14 @@
|
||||
import {MessageBus} from "angular2/src/web_workers/shared/message_bus";
|
||||
import {
|
||||
print,
|
||||
isPresent,
|
||||
DateWrapper,
|
||||
stringify,
|
||||
Type,
|
||||
StringWrapper
|
||||
} from "angular2/src/facade/lang";
|
||||
import {MessageBus} from './message_bus';
|
||||
import {print, isPresent, DateWrapper, stringify, StringWrapper} from '../../../src/facade/lang';
|
||||
import {
|
||||
PromiseCompleter,
|
||||
PromiseWrapper,
|
||||
ObservableWrapper,
|
||||
EventEmitter
|
||||
} from "angular2/src/facade/async";
|
||||
import {StringMapWrapper, MapWrapper} from "angular2/src/facade/collection";
|
||||
import {Serializer} from "angular2/src/web_workers/shared/serializer";
|
||||
import {Injectable} from "angular2/src/core/di";
|
||||
export {Type} from "angular2/src/facade/lang";
|
||||
} from '../../../src/facade/async';
|
||||
import {StringMapWrapper} from '../../../src/facade/collection';
|
||||
import {Serializer} from './serializer';
|
||||
import {Injectable, Type} from '@angular/core';
|
||||
|
||||
export abstract class ClientMessageBrokerFactory {
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {EventEmitter} from 'angular2/src/facade/async';
|
||||
import {NgZone} from 'angular2/src/core/zone/ng_zone';
|
||||
export {EventEmitter, Observable} from 'angular2/src/facade/async';
|
||||
import {EventEmitter} from '../../../src/facade/async';
|
||||
import {NgZone} from '@angular/core/src/zone/ng_zone';
|
||||
export {EventEmitter, Observable} from '../../../src/facade/async';
|
||||
|
||||
/**
|
||||
* Message Bus is a low level API used to communicate between the UI and the background.
|
||||
|
@ -1,13 +1,9 @@
|
||||
import {
|
||||
MessageBus,
|
||||
MessageBusSource,
|
||||
MessageBusSink
|
||||
} from "angular2/src/web_workers/shared/message_bus";
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
|
||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {Injectable} from "angular2/src/core/di";
|
||||
import {NgZone} from 'angular2/src/core/zone/ng_zone';
|
||||
import {MessageBus, MessageBusSource, MessageBusSink} from './message_bus';
|
||||
import {BaseException} from '../../../src/facade/exceptions';
|
||||
import {EventEmitter, ObservableWrapper} from '../../../src/facade/async';
|
||||
import {StringMapWrapper} from '../../../src/facade/collection';
|
||||
import {Injectable} from '@angular/core/src/di';
|
||||
import {NgZone} from '@angular/core/src/zone/ng_zone';
|
||||
|
||||
// TODO(jteplitz602) Replace this with the definition in lib.webworker.d.ts(#3492)
|
||||
export interface PostMessageTarget { postMessage: (message: any, transfer?:[ArrayBuffer]) => void; }
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Injectable} from "angular2/src/core/di";
|
||||
import {Injectable} from '@angular/core/src/di';
|
||||
|
||||
@Injectable()
|
||||
export class RenderStore {
|
||||
|
@ -1,11 +1,9 @@
|
||||
import {Type, isArray, isPresent, serializeEnum, deserializeEnum} from "angular2/src/facade/lang";
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
|
||||
import {Map, StringMapWrapper, MapWrapper} from "angular2/src/facade/collection";
|
||||
import {RenderComponentType} from "angular2/src/core/render/api";
|
||||
import {Injectable} from "angular2/src/core/di";
|
||||
import {RenderStore} from 'angular2/src/web_workers/shared/render_store';
|
||||
import {ViewEncapsulation, VIEW_ENCAPSULATION_VALUES} from 'angular2/src/core/metadata/view';
|
||||
import {Type, isArray, isPresent, serializeEnum} from '../../../src/facade/lang';
|
||||
import {BaseException} from '../../../src/facade/exceptions';
|
||||
import {Map, StringMapWrapper, MapWrapper} from '../../../src/facade/collection';
|
||||
import {RenderComponentType, Injectable, ViewEncapsulation} from '@angular/core';
|
||||
import {VIEW_ENCAPSULATION_VALUES} from '../../../core_private';
|
||||
import {RenderStore} from './render_store';
|
||||
import {LocationType} from './serialized_types';
|
||||
|
||||
// PRIMITIVE is any type that does not need to be serialized (string, number, boolean)
|
||||
|
@ -1,9 +1,9 @@
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {ListWrapper, Map, MapWrapper} from 'angular2/src/facade/collection';
|
||||
import {Serializer} from "angular2/src/web_workers/shared/serializer";
|
||||
import {isPresent, Type, FunctionWrapper} from "angular2/src/facade/lang";
|
||||
import {MessageBus} from "angular2/src/web_workers/shared/message_bus";
|
||||
import {EventEmitter, PromiseWrapper, ObservableWrapper} from 'angular2/src/facade/async';
|
||||
import {Injectable} from '@angular/core/src/di';
|
||||
import {ListWrapper, Map} from '../../../src/facade/collection';
|
||||
import {Serializer} from '../shared/serializer';
|
||||
import {isPresent, Type, FunctionWrapper} from '../../../src/facade/lang';
|
||||
import {MessageBus} from '../shared/message_bus';
|
||||
import {EventEmitter, PromiseWrapper, ObservableWrapper} from '../../../src/facade/async';
|
||||
|
||||
export abstract class ServiceMessageBrokerFactory {
|
||||
/**
|
||||
|
@ -1,14 +1,13 @@
|
||||
import {Serializer, RenderStoreObject} from 'angular2/src/web_workers/shared/serializer';
|
||||
import {Serializer, RenderStoreObject} from '../shared/serializer';
|
||||
import {
|
||||
serializeMouseEvent,
|
||||
serializeKeyboardEvent,
|
||||
serializeGenericEvent,
|
||||
serializeEventWithTarget,
|
||||
serializeTransitionEvent
|
||||
} from 'angular2/src/web_workers/ui/event_serializer';
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
|
||||
} from './event_serializer';
|
||||
import {BaseException} from '../../../src/facade/exceptions';
|
||||
import {EventEmitter, ObservableWrapper} from '../../../src/facade/async';
|
||||
|
||||
export class EventDispatcher {
|
||||
constructor(private _sink: EventEmitter<any>, private _serializer: Serializer) {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Set} from 'angular2/src/facade/collection';
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
import {Set} from '../../../src/facade/collection';
|
||||
import {isPresent} from '../../../src/facade/lang';
|
||||
|
||||
const MOUSE_EVENT_PROPERTIES = [
|
||||
"altKey",
|
||||
|
@ -1,18 +1,18 @@
|
||||
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';
|
||||
} from '@angular/platform-browser/src/browser/location/browser_platform_location';
|
||||
import {UrlChangeListener} from '@angular/common';
|
||||
import {Injectable} from '@angular/core/src/di';
|
||||
import {ROUTER_CHANNEL} from '../shared/messaging_api';
|
||||
import {
|
||||
ServiceMessageBrokerFactory,
|
||||
ServiceMessageBroker
|
||||
} from 'angular2/src/web_workers/shared/service_message_broker';
|
||||
import {PRIMITIVE, Serializer} from 'angular2/src/web_workers/shared/serializer';
|
||||
} from '../shared/service_message_broker';
|
||||
import {PRIMITIVE, Serializer} from '../shared/serializer';
|
||||
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 {LocationType} from '../shared/serialized_types';
|
||||
import {MessageBus} from '../shared/message_bus';
|
||||
import {EventEmitter, ObservableWrapper, PromiseWrapper} from '../../../src/facade/async';
|
||||
|
||||
@Injectable()
|
||||
export class MessageBasedPlatformLocation {
|
||||
|
@ -1,13 +1,12 @@
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
|
||||
import {Serializer, PRIMITIVE, RenderStoreObject} from 'angular2/src/web_workers/shared/serializer';
|
||||
import {RootRenderer, Renderer, RenderComponentType} from 'angular2/src/core/render/api';
|
||||
import {EVENT_CHANNEL, RENDERER_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
|
||||
import {Type} from 'angular2/src/facade/lang';
|
||||
import {Injectable} from '@angular/core/src/di';
|
||||
import {MessageBus} from '../shared/message_bus';
|
||||
import {Serializer, PRIMITIVE, RenderStoreObject} from '../shared/serializer';
|
||||
import {RootRenderer, Renderer, RenderComponentType} from '@angular/core/src/render/api';
|
||||
import {EVENT_CHANNEL, RENDERER_CHANNEL} from '../shared/messaging_api';
|
||||
import {bind} from './bind';
|
||||
import {EventDispatcher} from 'angular2/src/web_workers/ui/event_dispatcher';
|
||||
import {RenderStore} from 'angular2/src/web_workers/shared/render_store';
|
||||
import {ServiceMessageBrokerFactory} from 'angular2/src/web_workers/shared/service_message_broker';
|
||||
import {EventDispatcher} from '../ui/event_dispatcher';
|
||||
import {RenderStore} from '../shared/render_store';
|
||||
import {ServiceMessageBrokerFactory} from '../shared/service_message_broker';
|
||||
|
||||
@Injectable()
|
||||
export class MessageBasedRenderer {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {MessageBasedPlatformLocation} from './platform_location';
|
||||
import {
|
||||
BrowserPlatformLocation
|
||||
} from 'angular2/src/platform/browser/location/browser_platform_location';
|
||||
import {APP_INITIALIZER, Provider, Injector, NgZone} from 'angular2/core';
|
||||
} from '@angular/platform-browser/src/browser/location/browser_platform_location';
|
||||
import {APP_INITIALIZER, Provider, Injector, NgZone} from '@angular/core';
|
||||
|
||||
export const WORKER_RENDER_ROUTER = /*@ts2dart_const*/[
|
||||
MessageBasedPlatformLocation,
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {PRIMITIVE} from 'angular2/src/web_workers/shared/serializer';
|
||||
import {XHR_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
|
||||
import {XHR} from 'angular2/src/compiler/xhr';
|
||||
import {ServiceMessageBrokerFactory} from 'angular2/src/web_workers/shared/service_message_broker';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {PRIMITIVE} from '../shared/serializer';
|
||||
import {XHR_CHANNEL} from '../shared/messaging_api';
|
||||
import {XHR} from '@angular/compiler';
|
||||
import {ServiceMessageBrokerFactory} from '../shared/service_message_broker';
|
||||
import {bind} from './bind';
|
||||
|
||||
@Injectable()
|
||||
|
@ -1,19 +1,19 @@
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {Injectable} from '@angular/core/src/di';
|
||||
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';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {PRIMITIVE, Serializer} from 'angular2/src/web_workers/shared/serializer';
|
||||
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
|
||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {StringWrapper} from 'angular2/src/facade/lang';
|
||||
} from '../shared/client_message_broker';
|
||||
import {PlatformLocation, UrlChangeEvent, UrlChangeListener} from '@angular/common';
|
||||
import {ROUTER_CHANNEL} from '../shared/messaging_api';
|
||||
import {LocationType} from '../shared/serialized_types';
|
||||
import {PromiseWrapper, EventEmitter, ObservableWrapper} from '../../../src/facade/async';
|
||||
import {BaseException} from '../../../src/facade/exceptions';
|
||||
import {PRIMITIVE, Serializer} from '../shared/serializer';
|
||||
import {MessageBus} from '../shared/message_bus';
|
||||
import {StringMapWrapper} from '../../../src/facade/collection';
|
||||
import {StringWrapper} from '../../../src/facade/lang';
|
||||
import {deserializeGenericEvent} from './event_deserializer';
|
||||
|
||||
@Injectable()
|
||||
|
@ -3,23 +3,23 @@ import {
|
||||
RootRenderer,
|
||||
RenderComponentType,
|
||||
RenderDebugInfo
|
||||
} from 'angular2/src/core/render/api';
|
||||
} from '@angular/core/src/render/api';
|
||||
import {
|
||||
ClientMessageBroker,
|
||||
ClientMessageBrokerFactory,
|
||||
FnArg,
|
||||
UiArguments
|
||||
} from "angular2/src/web_workers/shared/client_message_broker";
|
||||
import {isPresent, isBlank, print} from "angular2/src/facade/lang";
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {Injectable} from "angular2/src/core/di";
|
||||
import {RenderStore} from 'angular2/src/web_workers/shared/render_store';
|
||||
import {RENDERER_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
|
||||
import {Serializer, RenderStoreObject} from 'angular2/src/web_workers/shared/serializer';
|
||||
import {EVENT_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
|
||||
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
|
||||
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
|
||||
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||
} from '../shared/client_message_broker';
|
||||
import {isPresent, isBlank, print} from '../../../src/facade/lang';
|
||||
import {ListWrapper} from '../../../src/facade/collection';
|
||||
import {Injectable} from '@angular/core/src/di';
|
||||
import {RenderStore} from '../shared/render_store';
|
||||
import {RENDERER_CHANNEL} from '../shared/messaging_api';
|
||||
import {Serializer, RenderStoreObject} from '../shared/serializer';
|
||||
import {EVENT_CHANNEL} from '../shared/messaging_api';
|
||||
import {MessageBus} from '../shared/message_bus';
|
||||
import {ObservableWrapper} from '../../../src/facade/async';
|
||||
import {ViewEncapsulation} from '@angular/core';
|
||||
import {deserializeGenericEvent} from './event_deserializer';
|
||||
|
||||
@Injectable()
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {ApplicationRef, Provider, NgZone, APP_INITIALIZER} from 'angular2/core';
|
||||
import {PlatformLocation} from 'angular2/platform/common';
|
||||
import {Provider, NgZone, APP_INITIALIZER} from '@angular/core';
|
||||
import {PlatformLocation} from '@angular/common';
|
||||
import {WebWorkerPlatformLocation} from './platform_location';
|
||||
import {ROUTER_PROVIDERS_COMMON} from 'angular2/src/router/router_providers_common';
|
||||
import {ROUTER_PROVIDERS_COMMON} from '@angular/router';
|
||||
|
||||
export var WORKER_APP_ROUTER = [
|
||||
ROUTER_PROVIDERS_COMMON,
|
||||
|
@ -1,12 +1,12 @@
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {XHR} from 'angular2/src/compiler/xhr';
|
||||
import {Injectable} from '@angular/core/src/di';
|
||||
import {XHR} from '@angular/compiler/src/xhr';
|
||||
import {
|
||||
FnArg,
|
||||
UiArguments,
|
||||
ClientMessageBroker,
|
||||
ClientMessageBrokerFactory
|
||||
} from 'angular2/src/web_workers/shared/client_message_broker';
|
||||
import {XHR_CHANNEL} from 'angular2/src/web_workers/shared/messaging_api';
|
||||
} from '../shared/client_message_broker';
|
||||
import {XHR_CHANNEL} from '../shared/messaging_api';
|
||||
|
||||
/**
|
||||
* Implementation of compiler/xhr that relays XHR requests to the UI side where they are sent
|
||||
|
@ -1,16 +1,15 @@
|
||||
import {NgZone} from 'angular2/src/core/zone/ng_zone';
|
||||
import {Type, isPresent} from 'angular2/src/facade/lang';
|
||||
import {Provider} from 'angular2/src/core/di';
|
||||
import {Parse5DomAdapter} from 'angular2/src/platform/server/parse5_adapter';
|
||||
import {NgZone} from '@angular/core/src/zone/ng_zone';
|
||||
import {Provider} from '@angular/core/src/di';
|
||||
import {Parse5DomAdapter} from '@angular/platform-server';
|
||||
import {
|
||||
PostMessageBus,
|
||||
PostMessageBusSink,
|
||||
PostMessageBusSource
|
||||
} from 'angular2/src/web_workers/shared/post_message_bus';
|
||||
} from '../web_workers/shared/post_message_bus';
|
||||
import {WORKER_APP_APPLICATION_COMMON} from './worker_app_common';
|
||||
import {APP_INITIALIZER} from 'angular2/core';
|
||||
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
|
||||
import {COMPILER_PROVIDERS} from 'angular2/src/compiler/compiler';
|
||||
import {APP_INITIALIZER} from '@angular/core';
|
||||
import {MessageBus} from '../web_workers/shared/message_bus';
|
||||
import {COMPILER_PROVIDERS} from '@angular/compiler/src/compiler';
|
||||
|
||||
// TODO(jteplitz602) remove this and compile with lib.webworker.d.ts (#3492)
|
||||
let _postMessage = {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {XHR} from 'angular2/src/compiler/xhr';
|
||||
import {WebWorkerXHRImpl} from 'angular2/src/web_workers/worker/xhr_impl';
|
||||
import {WebWorkerRootRenderer} from 'angular2/src/web_workers/worker/renderer';
|
||||
import {print} from 'angular2/src/facade/lang';
|
||||
import {RootRenderer} from 'angular2/src/core/render/api';
|
||||
import {XHR} from '@angular/compiler';
|
||||
import {WebWorkerXHRImpl} from '../web_workers/worker/xhr_impl';
|
||||
import {WebWorkerRootRenderer} from '../web_workers/worker/renderer';
|
||||
import {print} from '../../src/facade/lang';
|
||||
import {RootRenderer} from '@angular/core/src/render/api';
|
||||
import {
|
||||
PLATFORM_DIRECTIVES,
|
||||
PLATFORM_PIPES,
|
||||
@ -10,19 +10,20 @@ import {
|
||||
APPLICATION_COMMON_PROVIDERS,
|
||||
PLATFORM_COMMON_PROVIDERS,
|
||||
OpaqueToken
|
||||
} from 'angular2/core';
|
||||
import {COMMON_DIRECTIVES, COMMON_PIPES, FORM_PROVIDERS} from "angular2/common";
|
||||
} from '@angular/core';
|
||||
import {COMMON_DIRECTIVES, COMMON_PIPES, FORM_PROVIDERS} from '@angular/common';
|
||||
import {
|
||||
ClientMessageBrokerFactory,
|
||||
ClientMessageBrokerFactory_
|
||||
} from 'angular2/src/web_workers/shared/client_message_broker';
|
||||
} from '../web_workers/shared/client_message_broker';
|
||||
import {
|
||||
ServiceMessageBrokerFactory,
|
||||
ServiceMessageBrokerFactory_
|
||||
} from 'angular2/src/web_workers/shared/service_message_broker';
|
||||
import {Serializer} from "angular2/src/web_workers/shared/serializer";
|
||||
import {ON_WEB_WORKER} from "angular2/src/web_workers/shared/api";
|
||||
import {RenderStore} from 'angular2/src/web_workers/shared/render_store';
|
||||
} from '../web_workers/shared/service_message_broker';
|
||||
import {Serializer} from '../web_workers/shared/serializer';
|
||||
import {ON_WEB_WORKER} from '../web_workers/shared/api';
|
||||
import {Provider} from '@angular/core/src/di';
|
||||
import {RenderStore} from '../web_workers/shared/render_store';
|
||||
|
||||
class PrintLogger {
|
||||
log = print;
|
||||
|
@ -2,19 +2,16 @@ import {
|
||||
PostMessageBus,
|
||||
PostMessageBusSink,
|
||||
PostMessageBusSource
|
||||
} from 'angular2/src/web_workers/shared/post_message_bus';
|
||||
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
|
||||
import {APP_INITIALIZER} from 'angular2/core';
|
||||
import {Injector, Injectable, Provider} from 'angular2/src/core/di';
|
||||
import {MessageBasedRenderer} from 'angular2/src/web_workers/ui/renderer';
|
||||
import {MessageBasedXHRImpl} from 'angular2/src/web_workers/ui/xhr_impl';
|
||||
} from '../web_workers/shared/post_message_bus';
|
||||
import {MessageBus} from '../web_workers/shared/message_bus';
|
||||
import {APP_INITIALIZER} from '@angular/core';
|
||||
import {Injector, Injectable, Provider} from '@angular/core/src/di';
|
||||
import {
|
||||
WORKER_RENDER_APPLICATION_COMMON,
|
||||
WORKER_RENDER_MESSAGING_PROVIDERS,
|
||||
WORKER_SCRIPT,
|
||||
initializeGenericWorkerRenderer
|
||||
} from 'angular2/src/platform/worker_render_common';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
} from './worker_render_common';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
|
||||
/**
|
||||
* Wrapper class that exposes the Worker
|
||||
|
@ -1,57 +1,49 @@
|
||||
import {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 {IS_DART} from '../../src/facade/lang';
|
||||
import {MessageBus} from '../web_workers/shared/message_bus';
|
||||
import {NgZone} from '@angular/core/src/zone/ng_zone';
|
||||
import {
|
||||
PLATFORM_DIRECTIVES,
|
||||
PLATFORM_PIPES,
|
||||
ComponentRef,
|
||||
ExceptionHandler,
|
||||
Reflector,
|
||||
reflector,
|
||||
APPLICATION_COMMON_PROVIDERS,
|
||||
PLATFORM_COMMON_PROVIDERS,
|
||||
RootRenderer,
|
||||
PLATFORM_INITIALIZER,
|
||||
APP_INITIALIZER
|
||||
} from 'angular2/core';
|
||||
import {EVENT_MANAGER_PLUGINS, EventManager} from 'angular2/platform/common_dom';
|
||||
import {provide, Provider, Injector, OpaqueToken} from 'angular2/src/core/di';
|
||||
// TODO change these imports once dom_adapter is moved out of core
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {DomEventsPlugin} from 'angular2/src/platform/dom/events/dom_events';
|
||||
import {KeyEventsPlugin} from 'angular2/src/platform/dom/events/key_events';
|
||||
import {DOCUMENT} from 'angular2/src/platform/dom/dom_tokens';
|
||||
import {DomRootRenderer, DomRootRenderer_} from 'angular2/src/platform/dom/dom_renderer';
|
||||
import {DomSharedStylesHost, SharedStylesHost} from 'angular2/src/platform/dom/shared_styles_host';
|
||||
import {BrowserDetails} from 'angular2/src/animate/browser_details';
|
||||
import {AnimationBuilder} from 'angular2/src/animate/animation_builder';
|
||||
import {XHR} from 'angular2/compiler';
|
||||
import {XHRImpl} from 'angular2/src/platform/browser/xhr_impl';
|
||||
import {Testability} from 'angular2/src/core/testability/testability';
|
||||
import {BrowserGetTestability} from 'angular2/src/platform/browser/testability';
|
||||
import {BrowserDomAdapter} from './browser/browser_adapter';
|
||||
import {wtfInit} from 'angular2/src/core/profile/wtf_init';
|
||||
import {MessageBasedRenderer} from 'angular2/src/web_workers/ui/renderer';
|
||||
import {MessageBasedXHRImpl} from 'angular2/src/web_workers/ui/xhr_impl';
|
||||
PLATFORM_INITIALIZER
|
||||
} from '@angular/core';
|
||||
import {Provider, Injector, OpaqueToken} from '@angular/core/src/di';
|
||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
import {DomEventsPlugin} from '@angular/platform-browser/src/dom/events/dom_events';
|
||||
import {KeyEventsPlugin} from '@angular/platform-browser/src/dom/events/key_events';
|
||||
import {HammerGesturesPlugin} from '@angular/platform-browser/src/dom/events/hammer_gestures';
|
||||
import {DOCUMENT} from '@angular/platform-browser/src/dom/dom_tokens';
|
||||
import {DomRootRenderer, DomRootRenderer_} from '@angular/platform-browser/src/dom/dom_renderer';
|
||||
import {
|
||||
DomSharedStylesHost,
|
||||
SharedStylesHost
|
||||
} from '@angular/platform-browser/src/dom/shared_styles_host';
|
||||
import {BrowserDetails} from '../animate/browser_details';
|
||||
import {AnimationBuilder} from '../animate/animation_builder';
|
||||
import {Testability} from '@angular/core/src/testability/testability';
|
||||
import {BrowserGetTestability} from '@angular/platform-browser/src/browser/testability';
|
||||
import {BrowserDomAdapter} from '../browser/browser_adapter';
|
||||
import {wtfInit} from '@angular/core/src/profile/wtf_init';
|
||||
import {MessageBasedRenderer} from '../web_workers/ui/renderer';
|
||||
import {
|
||||
ServiceMessageBrokerFactory,
|
||||
ServiceMessageBrokerFactory_
|
||||
} from 'angular2/src/web_workers/shared/service_message_broker';
|
||||
} from '../web_workers/shared/service_message_broker';
|
||||
import {
|
||||
ClientMessageBrokerFactory,
|
||||
ClientMessageBrokerFactory_
|
||||
} from 'angular2/src/web_workers/shared/client_message_broker';
|
||||
import {
|
||||
BrowserPlatformLocation
|
||||
} from 'angular2/src/platform/browser/location/browser_platform_location';
|
||||
import {Serializer} from 'angular2/src/web_workers/shared/serializer';
|
||||
import {ON_WEB_WORKER} from 'angular2/src/web_workers/shared/api';
|
||||
import {RenderStore} from 'angular2/src/web_workers/shared/render_store';
|
||||
import {
|
||||
HAMMER_GESTURE_CONFIG,
|
||||
HammerGestureConfig,
|
||||
HammerGesturesPlugin
|
||||
} from 'angular2/src/platform/dom/events/hammer_gestures';
|
||||
} from '../web_workers/shared/client_message_broker';
|
||||
import {BrowserPlatformLocation} from '@angular/platform-browser/src/browser/location/browser_platform_location';
|
||||
import {Serializer} from '../web_workers/shared/serializer';
|
||||
import {ON_WEB_WORKER} from '../web_workers/shared/api';
|
||||
import {RenderStore} from '../web_workers/shared/render_store';
|
||||
import {HAMMER_GESTURE_CONFIG, HammerGestureConfig} from '../dom/events/hammer_gestures';
|
||||
import {EventManager, EVENT_MANAGER_PLUGINS} from '../dom/events/event_manager';
|
||||
import {XHR} from "../../../compiler/src/xhr";
|
||||
import {XHRImpl} from "../../../platform-browser-dynamic/src/xhr/xhr_impl";
|
||||
import {MessageBasedXHRImpl} from "../web_workers/ui/xhr_impl";
|
||||
// TODO change these imports once dom_adapter is moved out of core
|
||||
|
||||
export const WORKER_SCRIPT: OpaqueToken = /*@ts2dart_const*/ new OpaqueToken("WebWorkerScript");
|
||||
|
||||
@ -121,9 +113,9 @@ export function initWebWorkerRenderPlatform(): void {
|
||||
}
|
||||
|
||||
function _exceptionHandler(): ExceptionHandler {
|
||||
return new ExceptionHandler(DOM, !IS_DART);
|
||||
return new ExceptionHandler(getDOM(), !IS_DART);
|
||||
}
|
||||
|
||||
function _document(): any {
|
||||
return DOM.defaultDoc();
|
||||
return getDOM().defaultDoc();
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {
|
||||
WORKER_APP_PLATFORM,
|
||||
WORKER_APP_PLATFORM_MARKER
|
||||
} from 'angular2/src/platform/worker_app_common';
|
||||
import {WORKER_APP_APPLICATION} from 'angular2/src/platform/worker_app';
|
||||
import {isPresent, isBlank} from './facade/lang';
|
||||
import {WORKER_APP_PLATFORM, WORKER_APP_PLATFORM_MARKER} from './webworker/worker_app_common';
|
||||
import {WORKER_APP_APPLICATION} from './webworker/worker_app';
|
||||
import {
|
||||
PlatformRef,
|
||||
Type,
|
||||
@ -13,27 +10,27 @@ import {
|
||||
getPlatform,
|
||||
createPlatform,
|
||||
assertPlatform
|
||||
} from 'angular2/core';
|
||||
} from '@angular/core';
|
||||
|
||||
export {
|
||||
WORKER_APP_PLATFORM,
|
||||
WORKER_APP_APPLICATION_COMMON
|
||||
} from 'angular2/src/platform/worker_app_common';
|
||||
export {WORKER_APP_APPLICATION} from 'angular2/src/platform/worker_app';
|
||||
} from './webworker/worker_app_common';
|
||||
export {WORKER_APP_APPLICATION} from './webworker/worker_app';
|
||||
export {
|
||||
ClientMessageBroker,
|
||||
ClientMessageBrokerFactory,
|
||||
FnArg,
|
||||
UiArguments
|
||||
} from 'angular2/src/web_workers/shared/client_message_broker';
|
||||
} from './web_workers/shared/client_message_broker';
|
||||
export {
|
||||
ReceivedMessage,
|
||||
ServiceMessageBroker,
|
||||
ServiceMessageBrokerFactory
|
||||
} from 'angular2/src/web_workers/shared/service_message_broker';
|
||||
export {PRIMITIVE} from 'angular2/src/web_workers/shared/serializer';
|
||||
export * from 'angular2/src/web_workers/shared/message_bus';
|
||||
export {WORKER_APP_ROUTER} from 'angular2/src/web_workers/worker/router_providers';
|
||||
} from './web_workers/shared/service_message_broker';
|
||||
export {PRIMITIVE} from './web_workers/shared/serializer';
|
||||
export * from './web_workers/shared/message_bus';
|
||||
export {WORKER_APP_ROUTER} from './web_workers/worker/router_providers';
|
||||
|
||||
export function workerAppPlatform(): PlatformRef {
|
||||
if (isBlank(getPlatform())) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {PromiseWrapper} from 'angular2/src/facade/async';
|
||||
import {isPresent, isBlank} from './facade/lang';
|
||||
import {PromiseWrapper} from './facade/async';
|
||||
import {
|
||||
ApplicationRef,
|
||||
PlatformRef,
|
||||
@ -8,40 +8,40 @@ import {
|
||||
getPlatform,
|
||||
createPlatform,
|
||||
assertPlatform
|
||||
} from 'angular2/core';
|
||||
import {WORKER_RENDER_APPLICATION} from 'angular2/src/platform/worker_render';
|
||||
} from '@angular/core';
|
||||
import {WORKER_RENDER_APPLICATION} from './webworker/worker_render';
|
||||
import {
|
||||
WORKER_SCRIPT,
|
||||
WORKER_RENDER_PLATFORM,
|
||||
WORKER_RENDER_PLATFORM_MARKER
|
||||
} from 'angular2/src/platform/worker_render_common';
|
||||
} from './webworker/worker_render_common';
|
||||
|
||||
export {
|
||||
WORKER_SCRIPT,
|
||||
WORKER_RENDER_PLATFORM,
|
||||
initializeGenericWorkerRenderer,
|
||||
WORKER_RENDER_APPLICATION_COMMON
|
||||
} from 'angular2/src/platform/worker_render_common';
|
||||
export {WORKER_RENDER_APPLICATION, WebWorkerInstance} from 'angular2/src/platform/worker_render';
|
||||
} from './webworker/worker_render_common';
|
||||
export {WORKER_RENDER_APPLICATION, WebWorkerInstance} from './webworker/worker_render';
|
||||
export {
|
||||
ClientMessageBroker,
|
||||
ClientMessageBrokerFactory,
|
||||
FnArg,
|
||||
UiArguments
|
||||
} from '../src/web_workers/shared/client_message_broker';
|
||||
} from './web_workers/shared/client_message_broker';
|
||||
export {
|
||||
ReceivedMessage,
|
||||
ServiceMessageBroker,
|
||||
ServiceMessageBrokerFactory
|
||||
} from '../src/web_workers/shared/service_message_broker';
|
||||
export {PRIMITIVE} from '../src/web_workers/shared/serializer';
|
||||
export * from '../src/web_workers/shared/message_bus';
|
||||
} from './web_workers/shared/service_message_broker';
|
||||
export {PRIMITIVE} from './web_workers/shared/serializer';
|
||||
export * from './web_workers/shared/message_bus';
|
||||
|
||||
/**
|
||||
* @deprecated Use WORKER_RENDER_APPLICATION
|
||||
*/
|
||||
export const WORKER_RENDER_APP = WORKER_RENDER_APPLICATION;
|
||||
export {WORKER_RENDER_ROUTER} from 'angular2/src/web_workers/ui/router_providers';
|
||||
export {WORKER_RENDER_ROUTER} from '../src/web_workers/ui/router_providers';
|
||||
|
||||
export function workerRenderPlatform(): PlatformRef {
|
||||
if (isBlank(getPlatform())) {
|
||||
|
Reference in New Issue
Block a user