Issue
I am following a tutorial that was made using Angular 8 and I am having an issue when it comes to defining an object.
brews: Object;
Error - Property 'brews' has no initializer and is not definitely assigned in the constructor.ts(2564)
How would I do the equivilent in Angular 11 ?
Solution
This is due to the rule strictPropertyInitialization
in tslint.json.
You can read more about this here TypeScript complain "has no initializer and is not definitely assigned in the constructor" about constructors by returning constructed object
Answered By - Prasanna Venkatesh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.