Skip to content
This repository was archived by the owner on Jun 23, 2026. It is now read-only.
This repository was archived by the owner on Jun 23, 2026. It is now read-only.

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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