Closed bhugot closed 4 years ago
Could be fixing also #38
About the #38 as we don't even call create editor we should not have this problem
Be aware that there is still a case where it will be failling if the component is in a ng-content as the ngOnDrestroy is not called https://stackblitz.com/edit/angular-ivy-jvybwy?file=src%2Fapp%2Fapp.component.html
@ezintz Thank you for checking this PR!
Be aware that there is still a case where it will be failling if the component is in a ng-content as the ngOnDrestroy is not called https://stackblitz.com/edit/angular-ivy-jvybwy?file=src%2Fapp%2Fapp.component.html
@bhugot can you elaborate more on this one? I don't see any errors in your code sample (nor CKEditor component)?
this example only show that when you have a
this example only show that when you have a as parent of another component then even if not displayed the ngOnInit is call (look in console log 'Child initialized') but the onDestroy is not call. That can lead on error with CKEditor (it's not an issue with ckeditor-angular) just for reference if someone has this issue sometime after this PR is merged
Thanks for the clarification @bhugot :+1: So it seems this is an issue in Angular itself (btw. do you have any number/reference to this issue, was it reported somewhere)?
Do you know any workaround for this issue so we can keep it for future reference?
An issue on this : https://github.com/angular/angular/issues/18982 One way to handle it, is to use a ng-template so the template is only used when is parent is visible
Rebased onto latest master
.
You're welcome
The problem is visible in #110