获取http:// localhost:8100 / Content.html 404(未找到)

时间:2016-06-21 19:39:01

标签: angularjs google-maps-api-3 ionic-framework gulp google-maps-markers

我正在使用离子框架并使用chrome中的离子服务测试我的应用程序。 Ionic使用gulp但gulpfile.js中没有关于html文件的内容 我无法在“源”选项卡下的检查器中找到它们,如css和js文件。
我要做的是添加角度谷歌地图标记的标签,如下所示:

- 我在ui-gmap-window templateUrl =“'views / markerLabelContent.html'”中有这个url

<div class="col" id="map_canvas" style="padding:2px !important;">
  <ui-gmap-google-map center="map.center" zoom="map.zoom" options="options">

    <ui-gmap-marker ng-repeat="marker in map.markers"coords="marker.coords" idkey="marker.id">
      <ui-gmap-window options="marker.labelOptions" show="marker.labelOptions.show" closeClick="closeWindow" templateUrl="'views/markerLabelContent.html'" templateParameter="labelParameters">
      </ui-gmap-window>
    </ui-gmap-marker>

  </ui-gmap-google-map>
</div>

使用函数初始化页面:

$scope.initialize = function () {
  $scope.content= contentService.all();

  for (var i = 0; i < $scope.content.length; i++) {
    var marker = {
      id: $scope.content[i].id,
      coords: {
        latitude: $scope.content[i].lat,
        longitude: $scope.content[i].lng
      },
      labelOptions: {
        position: {
          lat: $scope.content[i].lat,
          lng: $scope.content[i].lng
        },
        show: true
      },
      labelParameters: {
        shopName: $scope.content[i].shop_name
      }
    };

    $scope.map.markers.push(marker);
  }
}

地图和标记一样好用。我怀疑构建系统移动文件。模板位于同一文件夹中。

0 个答案:

没有答案