Property binding error after updating to Angular 13
See original GitHub issueWhich @angular/* package(s) are the source of the bug?
compiler, language-service
Is this a regression?
Yes
Description
I’m getting this error
Property binding ngIf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the “@NgModule.declarations”
Even thou it works fine when I run ng serve
.
I started to get this compilation error when I updated angular to v13
I already tried restarting Vscode and reinstalling Angular Language Service and installing a previous version of Angular Language Service… None of them works…
My app.module.ts
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [CommonModule, BrowserModule, AppRoutingModule],
providers: [],
bootstrap: [AppComponent],
exports: [CommonModule, BrowserModule],
})
export class AppModule {}
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version
)
No response
Anything else?
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Property binding error after updating to Angular 13
I started to get this compilation error when I updated angular to v13 . I already tried restarting Vscode and reinstalling Angular Language ......
Read more >Property binding best practices - Angular
If Angular does detect the change, it throws an error. As a best practice, use only properties and methods that return values. Return...
Read more >Property binding - Angular
Property binding moves a value in one direction, from a component's property into a target element property. For more information on listening for...
Read more >NG8002: Unknown attribute or input - Angular
An attribute or property cannot be resolved during compilation. This error arises when attempting to bind to a property that does not exist....
Read more >Binding syntax - Angular
Data binding automatically keeps your page up-to-date based on your ... Angular binding distinguishes between HTML attributes and DOM properties.
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 FreeTop 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
Top GitHub Comments
Do you have the
Use legacy View Engine language service.
option enabled in the plugin’s configuration? The VSCode client has some logic to determine whether the project can use the Ivy language service, such that incompatible projects will fallback to using ViewEngine. With theUse legacy View Engine language service.
option enabled, however, this fallback behavior is forcibly enabled. That results in an incompatibility with Angular 13, as ViewEngine cannot work with Angular 13 packages.This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.