私はgoogle maps infowindowの中にテンプレートを追加しようとしていますが、コンテンツをコンパイルしてinfowindow.content
に設定しようとするとコメントとして表示されます。私はバージョン1.2.27
を使用しています。ng-includeがコメントとして表示されます
var infowindow = new google.maps.InfoWindow();
var content = '<div id="iw_c" ng-include="\'/infowindow.html\'"></div>';
var compiled = $compile(content)(scope);
infowindow.setContent(compiled[0]);
console.log(infowindow.content);
そしてこのconsole.log(infowindow.content)
<!-- ngInclude: '/infowindow.html' -->
からの出力は、すでにthis questionでソリューションを試してみました。
あなたは ' '' 'コンテンツから()()''(\) ''脱出することで、単一のquotes.tryにこの ''
– gihanをパスをラップする必要があります。しかし、私が ''
''を入れても、私は同じ出力を得ます。 – shadow00FYI http://stackoverflow.com/questions/14226975/angularjs-ng-include-inside-of-google-maps-infowindow – gihan