Mauro Insacco
Mauro Insacco

Reputation: 1284

Ngrx-Component / VSCode - Property binding ngrxLet not used by any directive on an embedded template

I am unable to use ngrx/component in any project as it continues giving me "Property binding ngrxLet 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".ng" error.

It does actually work, but for some reason the ide is not able to recognize it in any ways, I noticed as well that it is unable to recognize directives template guards (which from ivy should be available).

I just tried with a fresh ng new --minimal 10.0.5 app, with just the ngrx component module imported, and several other projects.

My guess is that my angular language service is not working correctly, I tried to reinstall it and nothing changed, this is the list of all my extensions.

Ivy is indeed enabled in those projects, I tried both with a fresh new 10.0 project and other projects with ivy enabled flag set to true

example stackblitz (which actually works, as I said, it even works in my local machine, it just gives an error on the ide because it cant recognize the directive): https://stackblitz.com/edit/angular-ivy-gztygm?file=src%2Fapp%2Fapp.component.html

Upvotes: 0

Views: 2989

Answers (1)

clicks
clicks

Reputation: 74

I had the same issue and found that it was because I added the import { ReactiveComponentModule } from '@ngrx/component'; only to my feature module. When I also added it to the root module, the error in the IDE went away.

Upvotes: 2

Related Questions