Skip to content

Commit d3e115d

Browse files
committed
fix windows example
1 parent 2322c55 commit d3e115d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/views/examples/windows/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div id="map_canvas" ng-controller="mainCtrl">
22
<ui-gmap-google-map center="map.center" zoom="map.zoom" draggable="true" options="options" bounds="map.bounds">
3-
<ui-gmap-markers models="randomMarkers" coords="'self'" icon="'icon'" click="'onClick'">
3+
<ui-gmap-markers models="randomMarkers" coords="'self'" icon="'icon'" click="onClick">
44
<ui-gmap-windows show="show">
55
<div ng-non-bindable>{{title}}</div>
66
</ui-gmap-windows>

app/views/examples/windows/script.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ angular.module('appMaps', ['uiGmapgoogle-maps'])
2020
title: 'm' + i,
2121
show: false
2222
};
23-
ret.onClick = function() {
24-
console.log("Clicked!");
25-
ret.show = !ret.show;
26-
};
2723
ret[idKey] = i;
2824
return ret;
2925
};
26+
$scope.onClick = function(model) {
27+
console.log("Clicked!");
28+
model.show = !model.show;
29+
};
3030
$scope.randomMarkers = [];
3131
// Get the bounds from the map once it's loaded
3232
$scope.$watch(function() { return $scope.map.bounds; }, function(nv, ov) {
@@ -39,4 +39,4 @@ angular.module('appMaps', ['uiGmapgoogle-maps'])
3939
$scope.randomMarkers = markers;
4040
}
4141
}, true);
42-
});
42+
});

0 commit comments

Comments
 (0)