From 2053e038104486fd5413a2ea5371caee7450eef7 Mon Sep 17 00:00:00 2001 From: "runxc1(Bret Ferrier)" Date: Wed, 16 Oct 2013 17:07:00 -0600 Subject: [PATCH] Update ui-map.js I am removing the caching of the infoWindow as if the map is found inside an ngIf and is removed/added the second time the map is put on the page it will show the infoWindow from the previous map. --- ui-map.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ui-map.js b/ui-map.js index 33e377d..2579717 100644 --- a/ui-map.js +++ b/ui-map.js @@ -54,12 +54,7 @@ var opts = angular.extend({}, options, scope.$eval(attrs.uiOptions)); opts.content = elm[0]; var model = $parse(attrs.uiMapInfoWindow); - var infoWindow = model(scope); - - if (!infoWindow) { - infoWindow = new google.maps.InfoWindow(opts); - model.assign(scope, infoWindow); - } + var infoWindow = new google.maps.InfoWindow(opts); bindMapEvents(scope, infoWindowEvents, infoWindow, elm);