Billybonks
Billybonks

Reputation: 1568

Components are not being cleaned up on view change

I have a route that for each item in the array it will create a component.

when I change route I can still see the component

components created ideas.index, if you click on one of the titles you will see the remnants of the last view still on the page

I couldn't recreate the error with a smaller JS bin so I have attached a zip, you can host it on a Apache server or change the script references

bit.ly/1aFGfjk

Upvotes: 1

Views: 81

Answers (1)

Kingpin2k
Kingpin2k

Reputation: 47367

Your last div tag isn't closed on the component :)

   </div
</script>

Additionally while I was going through it all I noticed a couple of other things.

  1. components are agnostic of your app, so controllers.application in your component won't work
  2. your CanvasView should be extending Ember.View.createWithMixins

Upvotes: 1

Related Questions