I am instantiating it in my init() function right after I append the EJS to the this.element using can.view
I was able to put together a jsfiddle
Loads fine. If you go to the console in Chrome and make sure you change it so you can access the var in the fiddle: result(fiddle.jshell.net) then do try the following:
- games[0].attr('name', 'Dragon Warrior')
You will see live binding in action and it works.
Now destroy a game with:
- can.when(games[2].destroy()).then(function(g) { console.dir(g) } )
Even though the game was destroyed, it was not removed from the datagrid. This was my first indication that something was off.
Now try and change the name property of any of the games. Or any property for that matter:
- games[1].attr('name', 'Faxanadu')
This actually updates the value in the grid, but you will also get the error this post is about.
Thoughts? Is this because the plugin modifies the DOM? Is there a work around?
Thanks for looking at this. I need to figure a way to move forward and I'd like (need) to continue using the plugin