question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Property binding error after updating to Angular 13

See original GitHub issue

Which @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. image image

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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
JoostKcommented, Dec 12, 2021

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 the Use 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.

0reactions
angular-automatic-lock-bot[bot]commented, Feb 21, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found