I am trying to use waypoints in array:
var way = [{ location: { lat: 51.546550, lng: 0.026345 }, stopover: true }, { location: { lat: 51.5493953, lng: 0.0412878 }, stopover: true }];
And load on map like this:
<ng-map center="51.546550, 0.026345" zoom="13">
<directions draggable="true"
panel="directions-panel"
waypoints="way"
origin="51.546550, 0.026345"
destination="51.5493953, 0.0412878">
</directions>
</ng-map>
For some reason the error I am getting is:
InvalidValueError: in property waypoints: not an Array
If I use array directly it works:
<ng-map center="51.546550, 0.026345" zoom="13">
<directions draggable="true"
panel="directions-panel"
waypoints="[{ location: { lat: 51.546550, lng: 0.026345 }, stopover: true }, { location: { lat: 51.5493953, lng: 0.0412878 }, stopover: true }]"
origin="51.546550, 0.026345"
destination="51.5493953, 0.0412878">
</directions>
</ng-map>
What am I missing?