简体   繁体   中英

error TS5023: Unknown compiler option 'strictTemplates'

Compiling an angular application (v10) fails with this error.

An unhandled exception occurred: tsconfig.json:14:5 - error TS5023: Unknown compiler option 'strictTemplates'.

14     "strictTemplates": true,
       ~~~~~~~~~~~~~~~~~

strictTemplates is a parameter for the angular compiler.

In your tsconfig.json: move the parameter inside angularCompilerOptions

"angularCompilerOptions": {
  ...,
  "strictTemplates": true,
  ...
}

Angular >= 9 is necessary.

More info here: https://angular.io/guide/template-typecheck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM