Search code examples
angularvisual-studio-codeangular-language-service

Suppress Angular Language Service VSCode extension's "strictTemplates in angularCompilerOptions" notification


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 in angularCompilerOptions.

Source: Angular Language Service (Extension)

With a link to "Open tsconfig.json", like this:

visualization of above described text

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 Language Service (angular.ng-template) v11.2.3
  • Visual Studio Code version 1.53.2 on Windows 10

Solution

  • If you create a .code-workspace file for your workspace, you can add the following to disable the prompt:

        "settings": {
            "angular.enable-strict-mode-prompt": false
        }
    

    Note: if you open the workspace, the prompt shown above should have an additional button to add this setting for you:

    popup with button "Do not show again"