Closed cryptix closed 10 years ago
Look like a bug, I'll investigate the issue.
Gopherjs creates some kind of mysterious infinitely looping structure for slices ($val->$val->$val->$val...). Look like I have to modify watch.js again to avoid the issue.
I updated our bower watch.js repo. A bower update
now would solve the infinite loop.
But your code doesn't work yet, there are 2 flaws, one I just fixed with the new commit, and one is the flaw that: custom elements' model are created before binding, as a result when multiple custom elements are created with bind-each, only one model is used and so all elements have the same value.
I'm working on it.
okay, good to know that I got the general idea. :)
Kind of related note: it would be awesome if data-each would work on custom elements. (maybe it does, didn't test actually) it would get rid of the surrounding <div>
in a lot of cases.
Just tested it, works like you described, thanks.
All issues fixed now, cheers :). Thanks for the involvement dude. Btw I updated your code a bit, PRed on your repo.
Hi,
i started hacking on a TodoMVC example. It's still very much WIP but you can find it on my fork of wade here. I basically just introduced a custom element for the entries until know which you can than toggle or double click to edit.
I than wanted to add some kind of store to do the toggleAll, filtering, destoying etc. So I created a Controller returning a
TodoView
which has anEntries []TodoEntry
field. I than tried todata-each
that field in my html but I only get the errorUncaught RangeError: Maximum call stack size exceeded
.. Maybe I'm doing something inappropriate there, I don't know.. I pushed a separate branch here with my code at this point.I'm also open for other suggestions but I don't think there is much else to comment on yet.