angular.module('drApp', ['ng', 'ngRoute', 'ngAnimate'])
.controller('startCtrl', ['$scope',function ($scope) {
var map = new AMap.Map('container');
map.setZoom(16);
map.setCenter([116.397428, 39.90923]);
var marker = new AMap.Marker({
position: [116.397428, 39.90923],
map: map
});
}]);
錯誤提示:Uncaught ReferenceError: map is not defined
控制台印出的map:
錯誤代買出處: