Angular js谷歌地图infoWindow

时间:2015-02-22 22:28:53

标签: angularjs maps infowindow

我已经阅读了关于这个主题的所有内容,但我仍然没有得到实际效果的结果。 我正在循环内创建一个事件处理程序,用于gmaps标记打开一个infowindow并在其中加载一个div作为内容,使用ng-include指令进行模板化。 ng-include不起作用。

var content = '<div ng-include src="/templates/marker_infoview.html"></div>';
var compiled = $compile(content)($scope);

var markerEventListener = google.maps.event.addListener(markers[u], 'click', function() {
    $scope.$apply();
    stepDisplay.setContent(compiled[0]);
    stepDisplay.open($scope.map, markers[u]);

});

当我点击标记时,会打开一个空的infoWindow。它甚至看起来不像之前定义的内容字符串。 记录编译[0]它在我得到的控制台:“&lt;! - ngInclude: - &gt;”

有人能告诉我这里做错了什么吗?

由于

0 个答案:

没有答案
相关问题