Angular AgmDirection可见绑定工作不正常

Angular AgmDirection可见绑定工作不正常,angular,angular-google-maps,agm-direction,Angular,Angular Google Maps,Agm Direction,在我的项目中,我展示了10条路线的地图。我为每一条与agm方向标签绑定的路线设置了名为“可见”的标志。在按钮单击事件中,我将一些标志设置为false。有时,通过隐藏flag==false的路由,它可以很好地工作,但在某些情况下,它不起作用 <agm-map [styles]="mapstyles" [streetViewControl]="false"> <agm-direction *ngFor="let trip of planData.tripList [waypoi

在我的项目中,我展示了10条路线的地图。我为每一条与agm方向标签绑定的路线设置了名为“可见”的标志。在按钮单击事件中,我将一些标志设置为false。有时,通过隐藏flag==false的路由,它可以很好地工作,但在某些情况下,它不起作用

<agm-map [styles]="mapstyles" [streetViewControl]="false">
  <agm-direction *ngFor="let trip of planData.tripList [waypoints]="trip.waypoints" [visible]="trip.visible" [origin]="trip.origin" [destination]="trip.destination" [renderOptions]="{suppressMarkers: true, polylineOptions: { strokeColor: trip.hexColor }}">
    <agm-marker [latitude]="trip.origin.lat" [longitude]="trip.origin.lng">
      <agm-info-window isOpen="true">
          Depot
      </agm-info-window>
    </agm-marker>
    <div *ngIf="trip.showMarkers">
      <agm-marker class="marker" *ngFor="let marker of trip.markers" [latitude]="marker.latitude" [longitude]="marker.longitude">
        <agm-info-window>
           {{marker.customerName}}
        </agm-info-window>
      </agm-marker>
    </div>
   </agm-direction>
</agm-map>


你说的“它不工作”是什么意思?路由是否仍然出现,或者程序是否崩溃?@m.raynal不是所有路由都会出现,但某些路由的标志设置为false。您所说的“它不工作”是什么意思?路由是否仍然显示,或者程序是否崩溃?@m.raynal没有显示所有路由,但某些路由的标志设置为false。