fix(compiler): changed the compiler to set up event listeners and host properties on host view elements

Closes #1584
This commit is contained in:
vsavkin
2015-04-27 15:14:30 -07:00
committed by Misko Hevery
parent 414e58edb5
commit e3c11045bf
14 changed files with 187 additions and 93 deletions

View File

@ -90,7 +90,9 @@ export class Compiler {
compileInHost(componentTypeOrBinding:any):Promise<AppProtoView> {
var componentBinding = this._bindDirective(componentTypeOrBinding);
this._assertTypeIsComponent(componentBinding);
return this._renderer.createHostProtoView('host').then( (hostRenderPv) => {
var directiveMetadata = Compiler.buildRenderDirective(componentBinding);
return this._renderer.createHostProtoView(directiveMetadata).then( (hostRenderPv) => {
return this._compileNestedProtoViews(null, hostRenderPv, [componentBinding], true);
});
}