Using The "Definite Assignment Assertion" To Define Required Input Bindings In Angular 7.1.1

added by JavaScript Kicks
12/6/2018 7:50:24 AM

180 Views

Ben Nadel looks at the "Definite Assignment Assertion" introduced in TypeScript 2.7. This assertion makes it possible to declare input bindings as "required" on an Angular Directive without having to fully initialize the internal class property. This makes the code easier to work with; and, expresses better intent in the code.


0 comments