ngmap
Version:
The Simplest AngularJS Google Maps V3 Directive
33 lines (30 loc) • 853 B
HTML
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script src="script-tags-for-development.js"></script>
<script>
var app = angular.module('myApp', ['ngMap']);
app.controller('MyCtrl', function() {
this.click = function() {
alert(1);
};
this.firstThing = 'AAAAAAAAAAAAAA';
this.otherThings = ['BBBBBBB','CCCCCCCC'];
});
</script>
</head>
<body ng-app="myApp" ng-controller="MyCtrl as vm">
<ng-map center="41.850033, -87.6500523" zoom="6" default-style="true">
<custom-control id="home" position="TOP_RIGHT" index="1" on-click="vm.click()">
<div>
<ul>
<li>{{vm.firstThing}}</li>
<li>{{vm.otherThings}}</li>
<li ng-repeat="other in vm.otherThings">{{other}}</li>
</ul>
</div>
</custom-control>
</ng-map>
</body>
</html>