feat(transformers): collect data needed for the template compiler

Closes #7299
This commit is contained in:
vsavkin
2016-02-26 08:01:07 -08:00
committed by Victor Savkin
parent 1779caf5f8
commit ebe531bf92
38 changed files with 1187 additions and 193 deletions

View File

@ -1,6 +1,8 @@
import {ChangeDetector} from './interfaces';
import {ChangeDetectionStrategy} from './constants';
import {Injectable} from 'angular2/src/core/di';
@Injectable()
export abstract class ChangeDetectorRef {
/**
* Marks all {@link ChangeDetectionStrategy#OnPush} ancestors as to be checked.

View File

@ -1,4 +1,5 @@
import {unimplemented} from 'angular2/src/facade/exceptions';
import {Injectable} from 'angular2/src/core/di';
import {AppElement} from './element';
/**
@ -11,6 +12,7 @@ import {AppElement} from './element';
* An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM
* element.
*/
@Injectable()
export abstract class ElementRef {
/**
* The underlying native element or `null` if direct access to native elements is not supported

View File

@ -1,4 +1,5 @@
import {ElementRef, ElementRef_} from './element_ref';
import {Injectable} from 'angular2/src/core/di';
/**
* Represents an Embedded Template that can be used to instantiate Embedded Views.
@ -12,6 +13,7 @@ import {ElementRef, ElementRef_} from './element_ref';
* {@link ViewContainerRef#createEmbeddedView}, which will create the View and attach it to the
* View Container.
*/
@Injectable()
export abstract class TemplateRef {
/**
* The location in the View where the Embedded View logically belongs to.

View File

@ -1,6 +1,6 @@
import {ListWrapper} from 'angular2/src/facade/collection';
import {unimplemented} from 'angular2/src/facade/exceptions';
import {ResolvedProvider} from 'angular2/src/core/di';
import {ResolvedProvider, Injectable} from 'angular2/src/core/di';
import {isPresent, isBlank} from 'angular2/src/facade/lang';
import {AppElement} from './element';
@ -36,6 +36,7 @@ import {
*
* <!-- TODO(i): we are also considering ElementRef#viewContainer api -->
*/
@Injectable()
export abstract class ViewContainerRef {
/**
* Anchor element that specifies the location of this container in the containing View.

View File

@ -1,5 +1,5 @@
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
import {Injector} from 'angular2/src/core/di/injector';
import {Injector, Injectable} from 'angular2/src/core/di';
export class RenderComponentType {
constructor(public id: string, public encapsulation: ViewEncapsulation,
@ -13,6 +13,7 @@ export class RenderDebugInfo {
export interface ParentRenderer { renderComponent(componentType: RenderComponentType): Renderer; }
@Injectable()
export abstract class Renderer implements ParentRenderer {
abstract renderComponent(componentType: RenderComponentType): Renderer;