<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1063935717132479&amp;ev=PageView&amp;noscript=1 https://www.facebook.com/tr?id=1063935717132479&amp;ev=PageView&amp;noscript=1 "> Bitovi Blog - UX and UI design, JavaScript and Frontend development
Loading

Angular |

When to Use the Non-Null Assertion Operator in Angular

When to use the Non-null Assertion Operator in Angular in Strict mode.

Jennifer Wadella

Jennifer Wadella

Twitter Reddit

If you've recently made the switch to using Strict Mode for Angular, good job, you're on your way to writing better code and governing a more maintainable codebase! However, your team may encounter new TypeScript "errors" they haven't seen before, like "Property 'myClassMember' has no initializer and is not definitely assigned in the constructor.ts". To find out more about this error and how to resolve it using the Non-null Assertion Operator, check out my post on dev.to here: https://dev.to/bitovi/non-null-assertion-operator-in-angular-g5l