Practical and easy to follow code, thanks!. Question, what's the use of "!" in "this.form.get('name')!"?, I tried the code and I get an TSlint error "Forbidden non null assertion (no-non-null-assertion)", I understad that it might be to check if the field exists, but maybe we can do it in a different way to prevent that warning?. Cheers.
I am passionate about programming, expanding my abilities, and sharing knowledge. I try to be up to date with the latest versions of technology and I am happy to learn new, unknown solutions.
just skip it, as linter saying its a mistake ;) I'm fighting with the loading spinner, stackblitz.com/edit/angular-materi... but wont work with angular 10, and markDetectionChange :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Practical and easy to follow code, thanks!. Question, what's the use of "!" in "this.form.get('name')!"?, I tried the code and I get an TSlint error "Forbidden non null assertion (no-non-null-assertion)", I understad that it might be to check if the field exists, but maybe we can do it in a different way to prevent that warning?. Cheers.
Well, small hack could be:
But In this situation, I am telling code that I am sure about my name control because it is hardcoded.
just skip it, as linter saying its a mistake ;) I'm fighting with the loading spinner,
stackblitz.com/edit/angular-materi... but wont work with angular 10, and markDetectionChange :)