Using ng-repeat with markers in ngMap

后端 未结 2 702
挽巷
挽巷 2020-12-14 12:43

I want to use ngMap to add Google Maps to my app.

The demos are \"static\" in the sense that they have only hard coded HTML. I want my code to be \"dynamic\" in the

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-14 13:04

    Why not do something like

    
      
    
    

    If you asking for ng-repeat that would work. And you would populate the destinations with a simple http call to your backend:

    $http.get(url + '/destinations', config).success(function (data) {
      if (data != null && data.total > 0) {
          $scope.destinations = data.destinations;
      } else {
          $scope.destinations = []
      }
    });
    

提交回复
热议问题