Skip to content
This repository has been archived by the owner on Nov 30, 2018. It is now read-only.

Ngfor with agm-circle #2018

Open
KumailHussain opened this issue Sep 21, 2017 · 1 comment
Open

Ngfor with agm-circle #2018

KumailHussain opened this issue Sep 21, 2017 · 1 comment

Comments

@KumailHussain
Copy link

i want to generate n number of circles using ngfor with agm-circle but it throws error:
Can't bind to 'ngFor' since it isn't a known property of 'agm-circle'. Seriously !!!
here is my HTMl:

  <agm-circle *ngFor="data in circles"
                  [latitude]="data.lat"
                  [longitude]="data.lng"
                  [circleDraggable]="true"
                  [editable]="true"
                  [fillColor]="'data.color'"
                  [radius]="data.radius"
      >
      </agm-circle>

and data is:

this.circle = [ {lat: 51.79, lng: 7.8, radius: 60000, color: 'red'}, {lat: 52.79, lng: 12.8, radius: 60000, color: 'green'}, {lat: 54.79, lng: 10.8, radius: 60000, color: 'yellow'}, {lat: 51.79, lng: 8.8, radius: 60000, color: 'yellow'}, {lat: 60.79, lng: 7.8, radius: 60000, color: 'green'}, ];

@olalew
Copy link

olalew commented Dec 7, 2017

I think the error is that *ngFor should be used rather in that way *ngFor="let data of circles" and it should work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants