0

I have:

<ng-container *ngIf="vortexFeed">
  <agm-marker
      *ngFor="let m of mVortex; let i = index"
      (markerClick)="clickedMarker(m.label, i)"
      [latitude]="m.lat"
      [longitude]="m.lng"
      [label]="m.label"
      [markerDraggable]="m.draggable"
      (dragEnd)="markerDragEnd(m, $event)">

    <agm-info-window>
      <strong>Alert</strong>
    </agm-info-window>

  </agm-marker>
</ng-container>

Instead of "Alert" I want m.class. How can I reference the "m" object?

1
  • 2
    Well, using m. {{ m.class }}. You already using m everywhere. Why would it be different here? Commented Apr 2, 2018 at 21:41

2 Answers 2

2

if you want to output the m.class property you can use

 <agm-info-window>
  <strong>{{m.class}}</strong>
</agm-info-window>

more infos on string interpolation in the Angular docs

Sign up to request clarification or add additional context in comments.

Comments

1

replace Alert with {{m.class}}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.