refactor(core): introduce ComponentFactory.

Each compile template now exposes a `<CompName>NgFactory` variable
with an instance of a `ComponentFactory`.
Calling `ComponentFactory.create` returns a `ComponentRef` that can
be used directly.

BREAKING CHANGE:
- `Compiler` is renamed to `ComponentResolver`,
  `Compiler.compileInHost` has been renamed to `ComponentResolver.resolveComponent`.
- `ComponentRef.dispose` is renamed to `ComponentRef.destroy`
- `ViewContainerRef.createHostView` is renamed to `ViewContainerRef.createComponent`
- `ComponentFixture_` has been removed, the class `ComponentFixture`
  can now be created directly as it is no more using private APIs.
This commit is contained in:
Tobias Bosch
2016-04-13 17:05:17 -07:00
parent 41404057cf
commit 0c600cf6e3
66 changed files with 611 additions and 849 deletions
@@ -95,10 +95,10 @@ export class WebWorkerRenderer implements Renderer, RenderStoreObject {
this._rootRenderer.runOnService(fnName, fnArgsWithRenderer);
}
selectRootElement(selector: string, debugInfo: RenderDebugInfo): any {
selectRootElement(selectorOrNode: string, debugInfo: RenderDebugInfo): any {
var node = this._rootRenderer.allocateNode();
this._runOnService('selectRootElement',
[new FnArg(selector, null), new FnArg(node, RenderStoreObject)]);
[new FnArg(selectorOrNode, null), new FnArg(node, RenderStoreObject)]);
return node;
}