Skip to content
This repository has been archived by the owner on May 5, 2018. It is now read-only.

ng-repeat is applied multiple times when placed inside a ui-map-info-window #236

Closed
alexbirkett opened this issue Oct 18, 2012 · 6 comments
Labels

Comments

@alexbirkett
Copy link

The bug can be reproduced here:
http://alexbirkett.github.com/angular-ui.github.com/index.html

An array contains four items:
$scope.properties = [{name: "test"}, {name:"test2"}, {name:"test3"}, {name:"test4"}];

each item is rendered four times by ng-repeat e.g:

test
test
test
test
test2
test2
test2
test2
test3
test3
test3
test3
test4
test4

Each item is rendered five times if the array contains five items etc.

@ProLoser
Copy link
Member

Seems to be working currently. Feel free to comment/reopen if we still fail lol.

@redbraininc
Copy link

This still appears to be broken. Even worse, the number of renderings of each element in the ng-repeat array increases exponentially every time open() is called on the infoWindow. I'm seeing the same behavior in my app.

@shaungrady shaungrady reopened this Mar 22, 2013
@shaungrady
Copy link
Contributor

It looks like it's caused by the info window being recompiled every time it's opened, on this line:
https://github.com/angular-ui/angular-ui/blob/master/modules/directives/map/map.js#L76

I don't have time to look into this until possibly this weekend or Monday, but my question is:
Does it need to be compiled more than once? Or at all? uiMapInfoWindow isn't running at an elevated priority, so ngRepeat has already been compiled by the time uiMapInfoWindow starts compiling. This may have been necessary for an older version of AngularJS, but it doesn't seem necessary today.

@ProLoser
Copy link
Member

ProLoser commented May 3, 2013

AngularUI is currently undergoing a restructure. This project will no longer hold the codebase, can you please relocate this to https://github.com/angular-ui/ui-map (after confirming it's still necessary with the latest code)?

@Valorum
Copy link

Valorum commented Jul 23, 2013

Just putting this here for others: Just ran into this bug (using latest stable Angular and ui-map from master). Commented out the compile line as suggested by @shaungrady and it works properly now. (This suggests the whole decorating of the .open method can be taken out.)

@nateabele
Copy link

This repo is discontinued. The project has been relocated here: https://github.com/angular-ui/ui-map

Please reopen this issue there if it is still relevant.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants