Closed vweevers closed 10 years ago
scope
might be a better word for it, but I dunno. I kinda like the second one. Even though you type book twice, to me it looks easier to read and see what is going on.
Yeah, i hate naming things. I like scope
. Agree that second one is easier to read, so a better example would be something with nested properties, like <h1>{book.metadata.title} by {book.metadata.author}</h1>
.
Another benefit:
<div child="book" on-click="buyBook">{title}</div>
view.buyBook = function(el, ctx) {
// ctx.model is a book
}
Performance hit is too big. Re-rendering entire element is costly.
Wondering if this should be in core. Allows you to do:
Instead of: