refactor(core): move ViewEncapsulation
and ViewType
to the right places
Closes #4526
This commit is contained in:
parent
0299d4af00
commit
0b3e4fa090
@ -30,7 +30,7 @@ import {
|
|||||||
import {CompileTypeMetadata, CompileDirectiveMetadata} from './directive_metadata';
|
import {CompileTypeMetadata, CompileDirectiveMetadata} from './directive_metadata';
|
||||||
import {SourceExpressions, SourceExpression, moduleRef} from './source_module';
|
import {SourceExpressions, SourceExpression, moduleRef} from './source_module';
|
||||||
|
|
||||||
import {ViewEncapsulation} from 'angular2/src/core/render/api';
|
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||||
import {
|
import {
|
||||||
shimHostAttribute,
|
shimHostAttribute,
|
||||||
shimContentAttribute,
|
shimContentAttribute,
|
||||||
|
@ -12,7 +12,7 @@ import {
|
|||||||
ChangeDetectionStrategy,
|
ChangeDetectionStrategy,
|
||||||
CHANGE_DECTION_STRATEGY_VALUES
|
CHANGE_DECTION_STRATEGY_VALUES
|
||||||
} from 'angular2/src/core/change_detection/change_detection';
|
} from 'angular2/src/core/change_detection/change_detection';
|
||||||
import {ViewEncapsulation, VIEW_ENCAPSULATION_VALUES} from 'angular2/src/core/render/api';
|
import {ViewEncapsulation, VIEW_ENCAPSULATION_VALUES} from 'angular2/src/core/metadata/view';
|
||||||
import {CssSelector} from 'angular2/src/core/compiler/selector';
|
import {CssSelector} from 'angular2/src/core/compiler/selector';
|
||||||
import {splitAtColon} from './util';
|
import {splitAtColon} from './util';
|
||||||
import {LifecycleHooks, LIFECYCLE_HOOKS_VALUES} from 'angular2/src/core/linker/interfaces';
|
import {LifecycleHooks, LIFECYCLE_HOOKS_VALUES} from 'angular2/src/core/linker/interfaces';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {CompileTypeMetadata, CompileTemplateMetadata} from './directive_metadata';
|
import {CompileTypeMetadata, CompileTemplateMetadata} from './directive_metadata';
|
||||||
import {SourceModule, SourceExpression, moduleRef} from './source_module';
|
import {SourceModule, SourceExpression, moduleRef} from './source_module';
|
||||||
import {ViewEncapsulation} from 'angular2/src/core/render/api';
|
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||||
import {XHR} from 'angular2/src/core/compiler/xhr';
|
import {XHR} from 'angular2/src/core/compiler/xhr';
|
||||||
import {StringWrapper, isBlank} from 'angular2/src/core/facade/lang';
|
import {StringWrapper, isBlank} from 'angular2/src/core/facade/lang';
|
||||||
import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
|
import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
|
||||||
|
@ -11,7 +11,8 @@ import {XHR} from 'angular2/src/core/compiler/xhr';
|
|||||||
import {UrlResolver} from 'angular2/src/core/compiler/url_resolver';
|
import {UrlResolver} from 'angular2/src/core/compiler/url_resolver';
|
||||||
import {resolveStyleUrls} from './style_url_resolver';
|
import {resolveStyleUrls} from './style_url_resolver';
|
||||||
import {Injectable} from 'angular2/src/core/di';
|
import {Injectable} from 'angular2/src/core/di';
|
||||||
import {ViewEncapsulation} from 'angular2/src/core/render/api';
|
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||||
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
HtmlAstVisitor,
|
HtmlAstVisitor,
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||||
import {isPresent, isBlank, Type, isArray, isNumber} from 'angular2/src/core/facade/lang';
|
import {isPresent, isBlank, Type, isArray, isNumber} from 'angular2/src/core/facade/lang';
|
||||||
|
|
||||||
import {ViewType, RenderProtoViewRef} from 'angular2/src/core/render/api';
|
import {RenderProtoViewRef} from 'angular2/src/core/render/api';
|
||||||
|
|
||||||
import {Injectable, Binding, resolveForwardRef, Inject} from 'angular2/src/core/di';
|
import {Injectable, Binding, resolveForwardRef, Inject} from 'angular2/src/core/di';
|
||||||
|
|
||||||
import {PipeBinding} from '../pipes/pipe_binding';
|
import {PipeBinding} from '../pipes/pipe_binding';
|
||||||
import {ProtoPipes} from '../pipes/pipes';
|
import {ProtoPipes} from '../pipes/pipes';
|
||||||
|
|
||||||
import {AppProtoView, AppProtoViewMergeInfo} from './view';
|
import {AppProtoView, AppProtoViewMergeInfo, ViewType} from './view';
|
||||||
import {ElementBinder} from './element_binder';
|
import {ElementBinder} from './element_binder';
|
||||||
import {ProtoElementInjector, DirectiveBinding} from './element_injector';
|
import {ProtoElementInjector, DirectiveBinding} from './element_injector';
|
||||||
import {DirectiveResolver} from './directive_resolver';
|
import {DirectiveResolver} from './directive_resolver';
|
||||||
|
@ -38,6 +38,18 @@ export {DebugContext} from 'angular2/src/core/change_detection/interfaces';
|
|||||||
|
|
||||||
const REFLECT_PREFIX: string = 'ng-reflect-';
|
const REFLECT_PREFIX: string = 'ng-reflect-';
|
||||||
|
|
||||||
|
export enum ViewType {
|
||||||
|
// A view that contains the host element with bound component directive.
|
||||||
|
// Contains a COMPONENT view
|
||||||
|
HOST,
|
||||||
|
// The view of the component
|
||||||
|
// Can contain 0 to n EMBEDDED views
|
||||||
|
COMPONENT,
|
||||||
|
// A view that is embedded into another View via a <template> element
|
||||||
|
// inside of a COMPONENT view
|
||||||
|
EMBEDDED
|
||||||
|
}
|
||||||
|
|
||||||
export class AppViewContainer {
|
export class AppViewContainer {
|
||||||
// The order in this list matches the DOM order.
|
// The order in this list matches the DOM order.
|
||||||
views: AppView[] = [];
|
views: AppView[] = [];
|
||||||
@ -307,8 +319,8 @@ export class AppProtoView {
|
|||||||
textBindingCount = null;
|
textBindingCount = null;
|
||||||
render: renderApi.RenderProtoViewRef = null;
|
render: renderApi.RenderProtoViewRef = null;
|
||||||
|
|
||||||
constructor(public templateCmds: TemplateCmd[], public type: renderApi.ViewType,
|
constructor(public templateCmds: TemplateCmd[], public type: ViewType, public isMergable: boolean,
|
||||||
public isMergable: boolean, public changeDetectorFactory: Function,
|
public changeDetectorFactory: Function,
|
||||||
public templateVariableBindings: Map<string, string>, public pipes: ProtoPipes) {
|
public templateVariableBindings: Map<string, string>, public pipes: ProtoPipes) {
|
||||||
this.ref = new ProtoViewRef(this);
|
this.ref = new ProtoViewRef(this);
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,7 @@ import {
|
|||||||
Renderer,
|
Renderer,
|
||||||
RenderViewRef,
|
RenderViewRef,
|
||||||
RenderFragmentRef,
|
RenderFragmentRef,
|
||||||
RenderViewWithFragments,
|
RenderViewWithFragments
|
||||||
ViewType
|
|
||||||
} from 'angular2/src/core/render/api';
|
} from 'angular2/src/core/render/api';
|
||||||
import {AppViewManagerUtils} from './view_manager_utils';
|
import {AppViewManagerUtils} from './view_manager_utils';
|
||||||
import {AppViewPool} from './view_pool';
|
import {AppViewPool} from './view_pool';
|
||||||
@ -57,7 +56,7 @@ export class AppViewManager {
|
|||||||
*/
|
*/
|
||||||
getHostElement(hostViewRef: HostViewRef): ElementRef {
|
getHostElement(hostViewRef: HostViewRef): ElementRef {
|
||||||
var hostView = internalView(<ViewRef>hostViewRef);
|
var hostView = internalView(<ViewRef>hostViewRef);
|
||||||
if (hostView.proto.type !== ViewType.HOST) {
|
if (hostView.proto.type !== viewModule.ViewType.HOST) {
|
||||||
throw new BaseException('This operation is only allowed on host views');
|
throw new BaseException('This operation is only allowed on host views');
|
||||||
}
|
}
|
||||||
return hostView.elementRefs[hostView.elementOffset];
|
return hostView.elementRefs[hostView.elementOffset];
|
||||||
@ -205,7 +204,7 @@ export class AppViewManager {
|
|||||||
templateRef: TemplateRef): ViewRef {
|
templateRef: TemplateRef): ViewRef {
|
||||||
var s = this._createEmbeddedViewInContainerScope();
|
var s = this._createEmbeddedViewInContainerScope();
|
||||||
var protoView = internalProtoView(templateRef.protoViewRef);
|
var protoView = internalProtoView(templateRef.protoViewRef);
|
||||||
if (protoView.type !== ViewType.EMBEDDED) {
|
if (protoView.type !== viewModule.ViewType.EMBEDDED) {
|
||||||
throw new BaseException('This method can only be called with embedded ProtoViews!');
|
throw new BaseException('This method can only be called with embedded ProtoViews!');
|
||||||
}
|
}
|
||||||
this._protoViewFactory.initializeProtoViewIfNeeded(protoView);
|
this._protoViewFactory.initializeProtoViewIfNeeded(protoView);
|
||||||
@ -236,7 +235,7 @@ export class AppViewManager {
|
|||||||
imperativelyCreatedInjector: ResolvedBinding[]): HostViewRef {
|
imperativelyCreatedInjector: ResolvedBinding[]): HostViewRef {
|
||||||
var s = this._createHostViewInContainerScope();
|
var s = this._createHostViewInContainerScope();
|
||||||
var protoView = internalProtoView(protoViewRef);
|
var protoView = internalProtoView(protoViewRef);
|
||||||
if (protoView.type !== ViewType.HOST) {
|
if (protoView.type !== viewModule.ViewType.HOST) {
|
||||||
throw new BaseException('This method can only be called with host ProtoViews!');
|
throw new BaseException('This method can only be called with host ProtoViews!');
|
||||||
}
|
}
|
||||||
this._protoViewFactory.initializeProtoViewIfNeeded(protoView);
|
this._protoViewFactory.initializeProtoViewIfNeeded(protoView);
|
||||||
@ -258,7 +257,7 @@ export class AppViewManager {
|
|||||||
var contextBoundElementIndex = context.boundElementIndex;
|
var contextBoundElementIndex = context.boundElementIndex;
|
||||||
var embeddedFragmentView = contextView.getNestedView(contextBoundElementIndex);
|
var embeddedFragmentView = contextView.getNestedView(contextBoundElementIndex);
|
||||||
var view;
|
var view;
|
||||||
if (protoView.type === ViewType.EMBEDDED && isPresent(embeddedFragmentView) &&
|
if (protoView.type === viewModule.ViewType.EMBEDDED && isPresent(embeddedFragmentView) &&
|
||||||
!embeddedFragmentView.hydrated()) {
|
!embeddedFragmentView.hydrated()) {
|
||||||
// Case 1: instantiate the first view of a template that has been merged into a parent
|
// Case 1: instantiate the first view of a template that has been merged into a parent
|
||||||
view = embeddedFragmentView;
|
view = embeddedFragmentView;
|
||||||
|
@ -9,7 +9,6 @@ import {TemplateRef} from './template_ref';
|
|||||||
import {Renderer, RenderViewWithFragments} from 'angular2/src/core/render/api';
|
import {Renderer, RenderViewWithFragments} from 'angular2/src/core/render/api';
|
||||||
import {Locals} from 'angular2/src/core/change_detection/change_detection';
|
import {Locals} from 'angular2/src/core/change_detection/change_detection';
|
||||||
import {Pipes} from 'angular2/src/core/pipes/pipes';
|
import {Pipes} from 'angular2/src/core/pipes/pipes';
|
||||||
import {RenderViewRef, RenderFragmentRef, ViewType} from 'angular2/src/core/render/api';
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppViewManagerUtils {
|
export class AppViewManagerUtils {
|
||||||
@ -50,7 +49,7 @@ export class AppViewManagerUtils {
|
|||||||
.nestedProtoView :
|
.nestedProtoView :
|
||||||
mergedParentViewProto;
|
mergedParentViewProto;
|
||||||
var renderFragment = null;
|
var renderFragment = null;
|
||||||
if (viewOffset === 0 || protoView.type === ViewType.EMBEDDED) {
|
if (viewOffset === 0 || protoView.type === viewModule.ViewType.EMBEDDED) {
|
||||||
renderFragment = renderFragments[fragmentIdx++];
|
renderFragment = renderFragments[fragmentIdx++];
|
||||||
}
|
}
|
||||||
var currentView = new viewModule.AppView(renderer, protoView, viewOffset, elementOffset,
|
var currentView = new viewModule.AppView(renderer, protoView, viewOffset, elementOffset,
|
||||||
@ -93,7 +92,7 @@ export class AppViewManagerUtils {
|
|||||||
// preBuiltObjects
|
// preBuiltObjects
|
||||||
if (isPresent(elementInjector)) {
|
if (isPresent(elementInjector)) {
|
||||||
var templateRef = isPresent(binder.nestedProtoView) &&
|
var templateRef = isPresent(binder.nestedProtoView) &&
|
||||||
binder.nestedProtoView.type === ViewType.EMBEDDED ?
|
binder.nestedProtoView.type === viewModule.ViewType.EMBEDDED ?
|
||||||
new TemplateRef(el) :
|
new TemplateRef(el) :
|
||||||
null;
|
null;
|
||||||
preBuiltObjects[boundElementIndex] =
|
preBuiltObjects[boundElementIndex] =
|
||||||
@ -102,7 +101,7 @@ export class AppViewManagerUtils {
|
|||||||
}
|
}
|
||||||
currentView.init(protoView.changeDetectorFactory(currentView), elementInjectors,
|
currentView.init(protoView.changeDetectorFactory(currentView), elementInjectors,
|
||||||
rootElementInjectors, preBuiltObjects, views, elementRefs, viewContainers);
|
rootElementInjectors, preBuiltObjects, views, elementRefs, viewContainers);
|
||||||
if (isPresent(parentView) && protoView.type === ViewType.COMPONENT) {
|
if (isPresent(parentView) && protoView.type === viewModule.ViewType.COMPONENT) {
|
||||||
parentView.changeDetector.addShadowDomChild(currentView.changeDetector);
|
parentView.changeDetector.addShadowDomChild(currentView.changeDetector);
|
||||||
}
|
}
|
||||||
elementOffset += protoView.elementBinders.length;
|
elementOffset += protoView.elementBinders.length;
|
||||||
@ -180,7 +179,7 @@ export class AppViewManagerUtils {
|
|||||||
while (viewIdx <= endViewOffset) {
|
while (viewIdx <= endViewOffset) {
|
||||||
var currView = initView.views[viewIdx];
|
var currView = initView.views[viewIdx];
|
||||||
var currProtoView = currView.proto;
|
var currProtoView = currView.proto;
|
||||||
if (currView !== initView && currView.proto.type === ViewType.EMBEDDED) {
|
if (currView !== initView && currView.proto.type === viewModule.ViewType.EMBEDDED) {
|
||||||
// Don't hydrate components of embedded fragment views.
|
// Don't hydrate components of embedded fragment views.
|
||||||
viewIdx += currView.proto.mergeInfo.viewCount;
|
viewIdx += currView.proto.mergeInfo.viewCount;
|
||||||
} else {
|
} else {
|
||||||
|
@ -8,7 +8,7 @@ import './metadata/view.dart';
|
|||||||
|
|
||||||
export './metadata/di.dart';
|
export './metadata/di.dart';
|
||||||
export './metadata/directives.dart';
|
export './metadata/directives.dart';
|
||||||
export './metadata/view.dart';
|
export './metadata/view.dart' hide VIEW_ENCAPSULATION_VALUES;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See: [DirectiveMetadata] for docs.
|
* See: [DirectiveMetadata] for docs.
|
||||||
|
@ -1,7 +1,36 @@
|
|||||||
import {CONST, Type} from 'angular2/src/core/facade/lang';
|
import {CONST, Type} from 'angular2/src/core/facade/lang';
|
||||||
import {ViewEncapsulation} from 'angular2/src/core/render/api';
|
|
||||||
|
|
||||||
export {ViewEncapsulation} from 'angular2/src/core/render/api';
|
/**
|
||||||
|
* Defines template and style encapsulation options available for Component's {@link View}.
|
||||||
|
*
|
||||||
|
* See {@link ViewMetadata#encapsulation}.
|
||||||
|
*/
|
||||||
|
export enum ViewEncapsulation {
|
||||||
|
/**
|
||||||
|
* Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
|
||||||
|
* Element and pre-processing the style rules provided via
|
||||||
|
* {@link ViewMetadata#styles} or {@link ViewMetadata#stylesUrls}, and adding the new Host Element
|
||||||
|
* attribute to all selectors.
|
||||||
|
*
|
||||||
|
* This is the default option.
|
||||||
|
*/
|
||||||
|
Emulated,
|
||||||
|
/**
|
||||||
|
* Use the native encapsulation mechanism of the renderer.
|
||||||
|
*
|
||||||
|
* For the DOM this means using [Shadow DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
|
||||||
|
* creating a ShadowRoot for Component's Host Element.
|
||||||
|
*/
|
||||||
|
Native,
|
||||||
|
/**
|
||||||
|
* Don't provide any template or style encapsulation.
|
||||||
|
*/
|
||||||
|
None
|
||||||
|
}
|
||||||
|
|
||||||
|
export var VIEW_ENCAPSULATION_VALUES =
|
||||||
|
[ViewEncapsulation.Emulated, ViewEncapsulation.Native, ViewEncapsulation.None];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Metadata properties available for configuring Views.
|
* Metadata properties available for configuring Views.
|
||||||
|
@ -1,18 +1,5 @@
|
|||||||
import {Map} from 'angular2/src/core/facade/collection';
|
import {Map} from 'angular2/src/core/facade/collection';
|
||||||
|
|
||||||
export enum ViewType {
|
|
||||||
// A view that contains the host element with bound component directive.
|
|
||||||
// Contains a COMPONENT view
|
|
||||||
HOST,
|
|
||||||
// The view of the component
|
|
||||||
// Can contain 0 to n EMBEDDED views
|
|
||||||
COMPONENT,
|
|
||||||
// A view that is embedded into another View via a <template> element
|
|
||||||
// inside of a COMPONENT view
|
|
||||||
EMBEDDED
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents an Angular ProtoView in the Rendering Context.
|
* Represents an Angular ProtoView in the Rendering Context.
|
||||||
*
|
*
|
||||||
@ -89,38 +76,6 @@ export class RenderFragmentRef {}
|
|||||||
// TODO(i): refactor into an interface
|
// TODO(i): refactor into an interface
|
||||||
export class RenderViewRef {}
|
export class RenderViewRef {}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Defines template and style encapsulation options available for Component's {@link View}.
|
|
||||||
*
|
|
||||||
* See {@link ViewMetadata#encapsulation}.
|
|
||||||
*/
|
|
||||||
export enum ViewEncapsulation {
|
|
||||||
/**
|
|
||||||
* Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
|
|
||||||
* Element and pre-processing the style rules provided via
|
|
||||||
* {@link ViewMetadata#styles} or {@link ViewMetadata#stylesUrls}, and adding the new Host Element
|
|
||||||
* attribute to all selectors.
|
|
||||||
*
|
|
||||||
* This is the default option.
|
|
||||||
*/
|
|
||||||
Emulated,
|
|
||||||
/**
|
|
||||||
* Use the native encapsulation mechanism of the renderer.
|
|
||||||
*
|
|
||||||
* For the DOM this means using [Shadow DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
|
|
||||||
* creating a ShadowRoot for Component's Host Element.
|
|
||||||
*/
|
|
||||||
Native,
|
|
||||||
/**
|
|
||||||
* Don't provide any template or style encapsulation.
|
|
||||||
*/
|
|
||||||
None
|
|
||||||
}
|
|
||||||
|
|
||||||
export var VIEW_ENCAPSULATION_VALUES =
|
|
||||||
[ViewEncapsulation.Emulated, ViewEncapsulation.Native, ViewEncapsulation.None];
|
|
||||||
|
|
||||||
export interface RenderTemplateCmd { visit(visitor: RenderCommandVisitor, context: any): any; }
|
export interface RenderTemplateCmd { visit(visitor: RenderCommandVisitor, context: any): any; }
|
||||||
|
|
||||||
export interface RenderBeginCmd extends RenderTemplateCmd {
|
export interface RenderBeginCmd extends RenderTemplateCmd {
|
||||||
|
@ -13,8 +13,6 @@ import {
|
|||||||
RenderViewRef,
|
RenderViewRef,
|
||||||
RenderFragmentRef,
|
RenderFragmentRef,
|
||||||
RenderElementRef,
|
RenderElementRef,
|
||||||
ViewType,
|
|
||||||
ViewEncapsulation,
|
|
||||||
RenderTemplateCmd,
|
RenderTemplateCmd,
|
||||||
RenderCommandVisitor,
|
RenderCommandVisitor,
|
||||||
RenderTextCmd,
|
RenderTextCmd,
|
||||||
@ -46,23 +44,8 @@ export const PRIMITIVE: Type = String;
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Serializer {
|
export class Serializer {
|
||||||
private _enumRegistry: Map<any, Map<number, any>>;
|
|
||||||
constructor(private _protoViewStore: RenderProtoViewRefStore,
|
constructor(private _protoViewStore: RenderProtoViewRefStore,
|
||||||
private _renderViewStore: RenderViewWithFragmentsStore) {
|
private _renderViewStore: RenderViewWithFragmentsStore) {}
|
||||||
this._enumRegistry = new Map<any, Map<number, any>>();
|
|
||||||
|
|
||||||
var viewTypeMap = new Map<number, any>();
|
|
||||||
viewTypeMap[0] = ViewType.HOST;
|
|
||||||
viewTypeMap[1] = ViewType.COMPONENT;
|
|
||||||
viewTypeMap[2] = ViewType.EMBEDDED;
|
|
||||||
this._enumRegistry.set(ViewType, viewTypeMap);
|
|
||||||
|
|
||||||
var viewEncapsulationMap = new Map<number, any>();
|
|
||||||
viewEncapsulationMap[0] = ViewEncapsulation.Emulated;
|
|
||||||
viewEncapsulationMap[1] = ViewEncapsulation.Native;
|
|
||||||
viewEncapsulationMap[2] = ViewEncapsulation.None;
|
|
||||||
this._enumRegistry.set(ViewEncapsulation, viewEncapsulationMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
serialize(obj: any, type: Type): Object {
|
serialize(obj: any, type: Type): Object {
|
||||||
if (!isPresent(obj)) {
|
if (!isPresent(obj)) {
|
||||||
|
@ -35,7 +35,7 @@ import {
|
|||||||
CompileTemplateMetadata
|
CompileTemplateMetadata
|
||||||
} from 'angular2/src/core/compiler/directive_metadata';
|
} from 'angular2/src/core/compiler/directive_metadata';
|
||||||
import {SourceModule, SourceExpression, moduleRef} from 'angular2/src/core/compiler/source_module';
|
import {SourceModule, SourceExpression, moduleRef} from 'angular2/src/core/compiler/source_module';
|
||||||
import {ViewEncapsulation} from 'angular2/src/core/render/api';
|
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||||
import {evalModule} from './eval_module';
|
import {evalModule} from './eval_module';
|
||||||
import {
|
import {
|
||||||
escapeSingleQuoteString,
|
escapeSingleQuoteString,
|
||||||
|
@ -17,7 +17,7 @@ import {
|
|||||||
CompileTypeMetadata,
|
CompileTypeMetadata,
|
||||||
CompileTemplateMetadata
|
CompileTemplateMetadata
|
||||||
} from 'angular2/src/core/compiler/directive_metadata';
|
} from 'angular2/src/core/compiler/directive_metadata';
|
||||||
import {ViewEncapsulation} from 'angular2/src/core/render/api';
|
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||||
import {ChangeDetectionStrategy} from 'angular2/src/core/change_detection';
|
import {ChangeDetectionStrategy} from 'angular2/src/core/change_detection';
|
||||||
import {LifecycleHooks} from 'angular2/src/core/linker/interfaces';
|
import {LifecycleHooks} from 'angular2/src/core/linker/interfaces';
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ import {
|
|||||||
CompileTypeMetadata
|
CompileTypeMetadata
|
||||||
} from 'angular2/src/core/compiler/directive_metadata';
|
} from 'angular2/src/core/compiler/directive_metadata';
|
||||||
import {SourceExpression, SourceModule} from 'angular2/src/core/compiler/source_module';
|
import {SourceExpression, SourceModule} from 'angular2/src/core/compiler/source_module';
|
||||||
import {ViewEncapsulation} from 'angular2/src/core/render/api';
|
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||||
import {TEST_BINDINGS} from './test_bindings';
|
import {TEST_BINDINGS} from './test_bindings';
|
||||||
import {
|
import {
|
||||||
codeGenValueFn,
|
codeGenValueFn,
|
||||||
|
@ -26,7 +26,7 @@ import {evalModule} from './eval_module';
|
|||||||
import {SourceModule, moduleRef} from 'angular2/src/core/compiler/source_module';
|
import {SourceModule, moduleRef} from 'angular2/src/core/compiler/source_module';
|
||||||
import {XHR} from 'angular2/src/core/compiler/xhr';
|
import {XHR} from 'angular2/src/core/compiler/xhr';
|
||||||
import {MockXHR} from 'angular2/src/core/compiler/xhr_mock';
|
import {MockXHR} from 'angular2/src/core/compiler/xhr_mock';
|
||||||
import {ViewEncapsulation} from 'angular2/src/core/render/api';
|
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||||
|
|
||||||
import {Locals} from 'angular2/src/core/change_detection/change_detection';
|
import {Locals} from 'angular2/src/core/change_detection/change_detection';
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ import {
|
|||||||
CompileTypeMetadata,
|
CompileTypeMetadata,
|
||||||
CompileTemplateMetadata
|
CompileTemplateMetadata
|
||||||
} from 'angular2/src/core/compiler/directive_metadata';
|
} from 'angular2/src/core/compiler/directive_metadata';
|
||||||
import {ViewEncapsulation} from 'angular2/src/core/render/api';
|
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||||
|
|
||||||
import {TemplateNormalizer} from 'angular2/src/core/compiler/template_normalizer';
|
import {TemplateNormalizer} from 'angular2/src/core/compiler/template_normalizer';
|
||||||
import {XHR} from 'angular2/src/core/compiler/xhr';
|
import {XHR} from 'angular2/src/core/compiler/xhr';
|
||||||
|
@ -16,7 +16,7 @@ import {
|
|||||||
import {SpyRenderer, SpyAppViewPool, SpyAppViewListener, SpyProtoViewFactory} from '../spies';
|
import {SpyRenderer, SpyAppViewPool, SpyAppViewListener, SpyProtoViewFactory} from '../spies';
|
||||||
import {Injector, bind} from 'angular2/core';
|
import {Injector, bind} from 'angular2/core';
|
||||||
|
|
||||||
import {AppProtoView, AppView, AppViewContainer} from 'angular2/src/core/linker/view';
|
import {AppProtoView, AppView, AppViewContainer, ViewType} from 'angular2/src/core/linker/view';
|
||||||
import {ProtoViewRef, ViewRef, internalView} from 'angular2/src/core/linker/view_ref';
|
import {ProtoViewRef, ViewRef, internalView} from 'angular2/src/core/linker/view_ref';
|
||||||
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
||||||
import {TemplateRef} from 'angular2/src/core/linker/template_ref';
|
import {TemplateRef} from 'angular2/src/core/linker/template_ref';
|
||||||
@ -25,7 +25,6 @@ import {
|
|||||||
RenderViewRef,
|
RenderViewRef,
|
||||||
RenderProtoViewRef,
|
RenderProtoViewRef,
|
||||||
RenderFragmentRef,
|
RenderFragmentRef,
|
||||||
ViewType,
|
|
||||||
RenderViewWithFragments
|
RenderViewWithFragments
|
||||||
} from 'angular2/src/core/render/api';
|
} from 'angular2/src/core/render/api';
|
||||||
import {AppViewManager} from 'angular2/src/core/linker/view_manager';
|
import {AppViewManager} from 'angular2/src/core/linker/view_manager';
|
||||||
|
@ -26,7 +26,12 @@ import {
|
|||||||
import {Injector, bind} from 'angular2/core';
|
import {Injector, bind} from 'angular2/core';
|
||||||
import {isBlank, isPresent} from 'angular2/src/core/facade/lang';
|
import {isBlank, isPresent} from 'angular2/src/core/facade/lang';
|
||||||
|
|
||||||
import {AppProtoView, AppView, AppProtoViewMergeInfo} from 'angular2/src/core/linker/view';
|
import {
|
||||||
|
AppProtoView,
|
||||||
|
AppView,
|
||||||
|
AppProtoViewMergeInfo,
|
||||||
|
ViewType
|
||||||
|
} from 'angular2/src/core/linker/view';
|
||||||
import {ElementBinder} from 'angular2/src/core/linker/element_binder';
|
import {ElementBinder} from 'angular2/src/core/linker/element_binder';
|
||||||
import {
|
import {
|
||||||
DirectiveBinding,
|
DirectiveBinding,
|
||||||
@ -37,7 +42,7 @@ import {
|
|||||||
import {DirectiveResolver} from 'angular2/src/core/linker/directive_resolver';
|
import {DirectiveResolver} from 'angular2/src/core/linker/directive_resolver';
|
||||||
import {Component} from 'angular2/src/core/metadata';
|
import {Component} from 'angular2/src/core/metadata';
|
||||||
import {AppViewManagerUtils} from 'angular2/src/core/linker/view_manager_utils';
|
import {AppViewManagerUtils} from 'angular2/src/core/linker/view_manager_utils';
|
||||||
import {ViewType, RenderViewWithFragments} from 'angular2/src/core/render/render';
|
import {RenderViewWithFragments} from 'angular2/src/core/render/render';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
// TODO(tbosch): add more tests here!
|
// TODO(tbosch): add more tests here!
|
||||||
|
@ -7,7 +7,7 @@ import 'package:angular2/src/core/compiler/directive_metadata.dart';
|
|||||||
import 'package:angular2/src/core/compiler/template_compiler.dart';
|
import 'package:angular2/src/core/compiler/template_compiler.dart';
|
||||||
import 'package:angular2/src/core/change_detection/change_detection.dart';
|
import 'package:angular2/src/core/change_detection/change_detection.dart';
|
||||||
import 'package:angular2/src/core/linker/interfaces.dart' show LifecycleHooks;
|
import 'package:angular2/src/core/linker/interfaces.dart' show LifecycleHooks;
|
||||||
import 'package:angular2/src/core/render/api.dart' show ViewEncapsulation;
|
import 'package:angular2/src/core/metadata/view.dart' show ViewEncapsulation;
|
||||||
import 'package:angular2/src/transform/common/annotation_matcher.dart';
|
import 'package:angular2/src/transform/common/annotation_matcher.dart';
|
||||||
import 'package:angular2/src/transform/common/interface_matcher.dart';
|
import 'package:angular2/src/transform/common/interface_matcher.dart';
|
||||||
import 'package:barback/barback.dart' show AssetId;
|
import 'package:barback/barback.dart' show AssetId;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user