I have a legacy code that has disabled strictTemplates
in angularCompilerOptions. I want to turn on strictTemplates
for some components to refactor components one after another.
I tried to create multiple tsConfig files but at the end compiler does not recognize exculded or included files. Is there any way to explicitly exclude or include some components from strictTemplates
?
There is no configuration for that currently.
You can start with
In the most basic type-checking mode, with the fullTemplateTypeCheck
flag set to false
, Angular validates only top-level expressions in a template.
After you are done with this you can perform a commit, then move on to the below step.
If the fullTemplateTypeCheck
flag is set to true
, Angular is more aggressive in its type-checking within templates. In particular:
If you want to take it a step further after this, you can follow the docs for
Angular maintains the behavior of the fullTemplateTypeCheck
flag, and introduces a third "strict mode". Strict mode is a superset of full mode, and is accessed by setting the strictTemplates
flag to true. This flag supersedes the fullTemplateTypeCheck
flag.