我似乎无法让我的codepen工作。它使用angular-google-maps。
任何帮助都将非常感激。
感谢。
http://codepen.io/0101adm/pen/GZRRBq
var app = angular.module('MyApp', ['ngMaterial','ngMessages', 'uiGmapgoogle-maps']);
app.controller('AppCtrl', ['$scope', function($scope) {
}]);
app.directive('mreTest', function(){
return {
template: "<div><ui-gmap-google-map center='center' zoom='zoom' control='control'></ui-gmap-google-map></div>",
restrict: 'E',
replace: true,
scope: true,
link: function($scope, element, attributes) {
$scope.center = { latitude: 45, longitude: -73 };
$scope.zoom = 8;
$scope.$watch(() => {
return $scope.control;
},
(newValue) => {
alert(newValue);
});
}
};
});