Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
angular 9 with ivy
Is this a regression?
I check the Ivy Minor Change docs here
and found that
It will bring lots of break changes to our UI library when upgrading it to angular 9 with ivy, because of many components' input support both
When the user passes a TemplateRef with a variable to the component, the template inside the component won't update any longer even if the variable has changed outside the component, which is a very common situation.
the select API here: https://ng.ant.design/components/select/en#api
The feature comes from a directive here: https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/core/addon/string_template_outlet.ts#L24 which brought a lot of convenience to the user.
I wonder if it is possible to keep the same as the previous version of the template check behavior
Thanks a lot
I agree that this is a very confusing change. The problem here is when using OnPush, how would the insertion point component know if some bindings were changed in the external template, and mark itself for check?
I can see that angular material is facing the same issue and they workaround it by disabling OnPush, which is not really a great thing to do as far as i'm concerned. Our angular app is actually using OnPush on every component, but now it looks it would not be possible to follow this strategy anymore.
The previous behavior looks absolutely logical to me (check template when either insertion point or the origin view is checked).
Also, i would argue that this is a "less common" breaking change, as passing TemplateRefs around the app is a pretty common strategy for angular apps of medium to large scale.