This component requires inline template type-checking, which is not supported by the current environment.(-998900)
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/compiler-cliIs this a regression?
Yes, the previous version in which this bug was not present was: yes, this error is only shown when I enable preview ivy language service.Description
Angular LS gives me an error, but it doesnβt say me what happens or how I can fix it. I have located that error message being produced from here https://github.com/angular/angular/blob/master/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts#L155-L159
By what I can test it, Angular doesnβt like that my component has a generic which extends.
π¬ Minimal Reproduction
@Component({
selector: 'test-app',
template: ``,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class Testcomponent<Model extends Object> {}
This doesnβt produce that message error:
@Component({
selector: 'test-app',
template: ``,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class Testcomponent<Model> {}
If component has a templateUrl
, the error is shown there too⦠but without no sense the location
π₯ Exception or Error
this is the Angular Language Service error:
This component requires inline template type-checking, which is not supported by the current environment.(-998900)
π Your Environment
Angular Version:
Angular CLI: 11.1.3
Node: 14.15.4
OS: linux x64
Angular: 11.1.2
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: <error>
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1100.7
@angular-devkit/build-angular 0.1101.3
@angular-devkit/core 11.0.7
@angular-devkit/schematics 11.0.7
@angular/cli 11.1.3
@schematics/angular 11.0.7
@schematics/update 0.1101.3
rxjs 6.6.3
typescript 4.1.3
Anything else relevant?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Type-checking templates in Angular View Engine and Ivy
It shows us that Angular treats a component's template as a partial TypeScript file. ... when Ivy has to inline TCB blocks into...
Read more >Template type checking - Angular
Overview of template type checkinglink. Just as TypeScript catches type errors in your code, Angular checks the expressions and bindings within theΒ ...
Read more >Angular Template Type Checking - JavaScript in Plain English
In Angular 9, a neat new template type checking mode has been introduced, called strictTemplates. Let me tell your what it is and...
Read more >Angular Cli support for inline templates and css - Stack Overflow
In the current version of the CLI (version 6) I just created a new project with ng new foo -s -t . The...
Read more >Language Service: This component requires inline template type ...
Language Service: This component requires inline template type-checking, which is not supported by the current environment.(-998900)
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry, VSCode, yes. You can also search for the Angular Service extension in the extension panel and then click on the extension setting icon.
@ray-kay in VSCode, go to File -> Preferences -> Settings and type
Angular:Experimental-ivy
on the search box