【问题标题】:ng-map is not compiling in angularJSng-map 未在 angularJS 中编译
【发布时间】:2015-02-14 10:38:17
【问题描述】:

我在我的 ang 中包含了诸如 ngMap,nvd3 之类的指令

var app = angular.module('myApp', [ 'nvd3','ngMap']);

angular.module('myApp').
controller('MainCtrl', ['$scope', '$filter', '$compile',  '$http', '$q', '$log', function($scope,  $compile, $timeout, $http) {

var template = '<div class= "chartsDiv">'
							+ ' <div class="col"> <p class="graphtitle"> NetSpend Over Time </p> <nvd3 id = "chart3" options="netspendovertime_options" data="netspendovertime_data"></nvd3> </div>'
							+ ' <div class="col"> <p class="graphtitle"> Google Map </p>   <map center="43.07493,-89.381388" zoom="8"> </map> </div>'
							+ ' </div>';

});

ularJs 应用程序。

在控制器中准备了两个仪表板,一个与nvd3相关,另一个与ngMap相关。渲染到浏览器时,nvd3 相关仪表板正在显示。ngmap 相关仪表板未显示。

创建模板的示例代码为:

【问题讨论】:

    标签: angularjs google-maps-api-3 angularjs-directive angularjs-scope angular-google-maps


    【解决方案1】:

    您是否在 angular.js 之前的标题中添加了引用?

    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=weather,visualization,panoramio"></script>
    

    【讨论】:

      猜你喜欢
      • 2023-04-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-20
      • 2013-11-12
      • 1970-01-01
      相关资源
      最近更新 更多