Skip to content

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

@wro

Description

@wro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions