Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template gets added to dom multiple times and old feed is not cleared #16

Open
wro opened this issue Nov 13, 2015 · 0 comments
Open

Template gets added to dom multiple times and old feed is not cleared #16

wro opened this issue Nov 13, 2015 · 0 comments

Comments

@wro
Copy link

wro commented Nov 13, 2015

I am using a dynamic url so everytime the url changes the feed is fetched again. Because the success handler for that call renders the template the template gets added to the DOM every time. Ideally the template should only be added to the DOM once. Additionally because the renderTemplate function iterates over the feed objects and adds them to the feeds on the scope the old feeds are maintained instead of cleared.

The result is that when initially 3 objects are rendered, when the url changes there are 12 because 3 additional objects were retrieved and stored in the same array and the template is rendered twice as well.

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

No branches or pull requests

1 participant