Since we upgraded our codebase to Angular 11 I get this message in VSCode:
Some language features are not available. To access all features, enable
strictTemplates
inangularCompilerOptions
.Source: Angular Language Service (Extension)
With a link to "Open tsconfig.json", like this:
I'm looking forward to enabling this and enjoying the new feature. But I want to set time apart to do and test this. For now, the popup in VSCode keeps coming up all the time, which is annoying and distracting.
How can I (for now) suppress this message, preferably for my current workspace?
angular.ng-template
) v11.2.3This extension for Visual Studio Code adds snippets for Angular for TypeScript and HTML. This extension for Visual Studio Code saves a lot of time by adding snippets for Angular for TypeScript and HTML. It can be used with vs code 0.10.1 version or higher.
The Angular Language Service uses the same set of options that are used to compile the application. To get the most complete information in the editor, set the strictTemplates option in tsconfig.json , as shown in the following example:
When strictTemplates is true, Angular 9 and the Ivy compiler verify that hero is a valid model of type Hero, and that the properties on that model ( hero. id and hero. name) are also valid. "Angular 9's Ivy compiler and the strict template check finds errors that Angular 8 could not detect."
If the typescript package is loaded by methods (1) or (3), there is a potential for a mismatch between the API expected by @angular/language-service and the API provided by typescript. This could lead to a failure of the language service extension.
Hi guys I had the same problem but I did this and that message stopped showing... I hope help us.
tsconfig.json
{ "extends": "../../tsconfig.json", "compilerOptions": { "types": ["node", "jest"] }, "include": [...], "angularCompilerOptions": { "strictTemplates": true } }
Configuration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With