I have the following code (Angular2 rc.5) :
app.html
<div>
<myComp #compo-binding="my-comp" *ngIf="someCondition"></myComp>
{{ compo-binding.test }}
</div>
The myComp's html is injected correctly, however compo-binding.test
is generating an error saying that test doesn't exist on undefined
myComp.component.ts
import { Component } from "@angular/core"
@Component({
selector: "myComp",
exportAs: "my-comp",
templateUrl: "./myComp.html"
})
export class MyComp{
test: boolean = true
}
Any idea what I am doing wrong with the exportAs
?