angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

map is never drawn because !scope.hasOwnProperty('refresh') always returns true - AngularJS v1.0.4

Open leon opened this issue 13 years ago • 3 comments

It seems that angular adds a function for all & scopes https://github.com/angular/angular.js/blob/49f9e4cef13e68ff85b3c160cf8fac6e7cd042a3/src/ng/compile.js#L765

so when we check to see if there is a refresh value, that's created here https://github.com/nlaplante/angular-google-maps/blob/master/src/angular-google-maps.js#L309

it always returns true https://github.com/nlaplante/angular-google-maps/blob/master/src/angular-google-maps.js#L418

If I change line 418 to if (angular.isUndefined(scope.refresh())) { It Works with both a defined refresh attribute and without it.

I'm quite new to angular, so I might be totally wrong, if so tell me :)

leon avatar Jan 27 '13 07:01 leon

This seems to be the case in AngularJS v1.0.2 as well. At least in my testing. Thanks for the fix.

sharpone74 avatar Jan 31 '13 05:01 sharpone74

Can you confirm it works now?

nlaplante avatar Jan 31 '13 13:01 nlaplante

Closing as fixed.

nlaplante avatar May 29 '13 19:05 nlaplante