You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: