-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADF-5432] component template and code fixes after testing Angular strict mode #7118
Conversation
data-automation-id="app-group-app-input"/> | ||
</mat-form-field> | ||
<mat-form-field class="app-preselect-value-full"> | ||
<mat-label>Preselect: {{ DEFAULT_GROUP_PLACEHOLDER }}</mat-label> | ||
<input matInput | ||
(input)="setGroupsPreselectValue($event.target?.value)" | ||
(input)="setGroupsPreselectValue($any($event).target?.value)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the recommended way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it is a suggested way to address untyped events, like DOM ones, see https://angular.io/guide/template-typecheck#disabling-type-checking-using-any
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other way would be type casting in the event handler function
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behaviour? (You can also link to an open issue here)
What is the new behaviour?
Enable strict mode for the component templates (Angular compiler)
multiple fixes for the issues found when enabling the
strictTemplates
compilation option with Angular.those are the small portion of fixes, more changes will be needed to enable the strict mode permanently
(note that with Angular 12 this mode is on by default).
For more details please check:
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information:
https://alfresco.atlassian.net/browse/ADF-5432