Can't bind to 'ngForOf' since it isn't a known property of 'li' in ngFor Angular

I saw another question about the same problem, but I don’t know why I get this error.
The odd thing here is that I did another component that returns a array and works fine, now I’ve created this new one but it doesn’t work.

Can’t bind to ‘ngForOf’ since it isn’t a known property of ‘li’

this is my component SubscriptionCustumerComponent:

    public subscriptions:Subscription[];

constructor(private subscriptionService:CustumerSubscriptionService){} 

ngOnInit(): void {

            error=> this.errorMessage);

the page:

    <ul  class="nav">
    <li *ngFor="let data of subscriptions" >
        <div class="card">
             <img src="{{data.image}}" style="width:100%;height:250px;">

the SubscriptionModule:

import { CommonModule } from "@angular/common";
import { NgModule } from "@angular/core";
import { CustumerSubscriptionService } from "./service/subscription.service";
import { CustumerSubscriptionAppComponent } from "./";
import { CustumerSubscriptioRoutingModule } from "./subscription.route";



export class CustumerSubscriptionModule{}

and the main Module AppModule:

  declarations: [

  imports: [
  providers: [httpInterceptorProviders],
  bootstrap: [AppComponent]
export class AppModule { }

79 thoughts on “Can't bind to 'ngForOf' since it isn't a known property of 'li' in ngFor Angular”

  1. Very nice post. I just stumbled upon your blog and wanted
    to say that I have truly enjoyed browsing your blog posts.
    In any case I will be subscribing to your feed and I hope you
    write again very soon!

  2. I do not even understand how I finished up right here, but I
    thought this put up was great. I do not know who you might be but certainly you are
    going to a well-known blogger when you are not already.

  3. Wonderful goods from you, man. I have understand your stuff
    prior to and you are simply extremely excellent. I really
    like what you’ve received right here, really like what you are saying
    and the best way wherein you assert it. You’re making it
    entertaining and you continue to care for to keep it wise.
    I cant wait to read far more from you. This is really a terrific website.

  4. Thank you for any other informative site. Where else may just I
    get that kind of information written in such a perfect
    method? I have a project that I’m simply now working on,
    and I’ve been on the glance out for such info.

  5. I do not know if it’s just me or if perhaps everybody else experiencing issues with your website.
    It appears like some of the text on your posts are running off the screen. Can someone
    else please provide feedback and let me know if this is happening to
    them as well? This could be a problem with my internet browser because I’ve had this happen previously.
    Appreciate it scoliosis surgery scoliosis surgery

  6. Good day! I could have sworn I’ve been to your blog before but after looking at some of the articles I realized it’s new to me. Anyways, I’m definitely delighted I discovered it and I’ll be book-marking it and checking back regularly!|

  7. Pingback: fighting sex games
  8. I’m really enjoying the design and layout of your blog. It’s a very
    easy on the eyes which makes it much more pleasant for me
    to come here and visit more often. Did you hire out a designer to create your theme?

    Outstanding work!


Leave a Comment