refactor(core): introduce ViewRef and ProtoViewRef

BREAKING CHANGES:
- `NgElement` merged into `ElementRef`
- `Compiler.compile…` returns `ProtoViewRef`
- `ViewContainer` uses `ProtoViewRef`s and `ViewRef`s.
- `ViewRef`/`ProtoViewRef` in renderer were renamed to
  `RenderViewRef`/`RenderProtoViewRef`.

Related to #1477
Closes #1592
This commit is contained in:
Tobias Bosch
2015-04-28 11:20:01 -07:00
parent 1205f54d01
commit 09f8d8f7ba
35 changed files with 473 additions and 404 deletions

View File

@ -1,7 +1,7 @@
import {Decorator} from 'angular2/src/core/annotations/annotations';
import {isPresent} from 'angular2/src/facade/lang';
import {DOM} from 'angular2/src/dom/dom_adapter';
import {NgElement} from 'angular2/src/core/compiler/ng_element';
import {ElementRef} from 'angular2/src/core/compiler/element_ref';
@Decorator({
selector: '[class]',
@ -11,7 +11,7 @@ import {NgElement} from 'angular2/src/core/compiler/ng_element';
})
export class CSSClass {
_domEl;
constructor(ngEl: NgElement) {
constructor(ngEl: ElementRef) {
this._domEl = ngEl.domElement;
}

View File

@ -1,6 +1,6 @@
import {Viewport} from 'angular2/src/core/annotations/annotations';
import {ViewContainerRef} from 'angular2/src/core/compiler/view_container_ref';
import {AppView} from 'angular2/src/core/compiler/view';
import {ViewRef} from 'angular2/src/core/compiler/view_ref';
import {isPresent, isBlank} from 'angular2/src/facade/lang';
import {ListWrapper} from 'angular2/src/facade/collection';
@ -114,7 +114,7 @@ export class For {
}
class RecordViewTuple {
view: AppView;
view: ViewRef;
record: any;
constructor(record, view) {
this.record = record;