From 1517ff9148bb1faac4972855b0f226196c483d80 Mon Sep 17 00:00:00 2001 From: Maurice Lam Date: Tue, 12 Feb 2013 23:15:44 -0600 Subject: [PATCH] Support minification --- src/angular-google-maps.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/angular-google-maps.js b/src/angular-google-maps.js index c1022aa45..fd2193f81 100644 --- a/src/angular-google-maps.js +++ b/src/angular-google-maps.js @@ -293,6 +293,17 @@ */ googleMapsModule.directive("googleMap", ["$log", "$timeout", "$filter", function ($log, $timeout, $filter) { + + var controller = function ($scope, $element) { + + var _m = $scope.map; + + self.addInfoWindow = function (lat, lng, content) { + _m.addInfoWindow(lat, lng, content); + }; + }; + + controller.$inject = ['$scope', '$element']; return { restrict: "EC", @@ -309,14 +320,7 @@ refresh: "&refresh", // optional windows: "=windows" // optional" }, - controller: function ($scope, $element) { - - var _m = $scope.map; - - self.addInfoWindow = function (lat, lng, content) { - _m.addInfoWindow(lat, lng, content); - }; - }, + controller: controller, link: function (scope, element, attrs, ctrl) { // Center property must be specified and provide lat &