'@Host() or ng-container incompatibility between angular 9 and 10

Here are two live examples on stackblitz:

To check the difference between them, open console and notice that:

In form-error-control-name.directive.ts line 22:

For angular 9, this.parent.control is not null For angular 10, this.parent.control will throw error

What is the difference? I checked angular 10 update doc but don't know which incompatibility this is.

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source