In on of our components in our Angular 2 / Ionic 2 (final/rc0) project I am using:
protected contentTarget: ViewContainerRef;
ngOnInit() {
this.contentTarget.createComponent(componentFactory);
}
AoT Compiler says:
Error at ....: Property 'contentTarget' is protected and only accessible within class 'IncludeTemplateComponent' and its subclasses.
Variable (property) is not used anywhere else in whole project.
So... could anybody shed some light on this, is createComponent factory passing the contentTarget variable to its child or why does compiler does not like protected here? Are protected variables "forbidden" in all of Angular2 now?