antonmedv / monkberry

Monkberry is a JavaScript library for building web user interfaces
https://monkberry.js.org
MIT License
1.49k stars 78 forks source link

context in template isn't passed #23

Open francescoagati opened 8 years ago

francescoagati commented 8 years ago

The context isn't passed when printed on template. Here an example http://jsfiddle.net/z8pzsdyv/11/

antonmedv commented 8 years ago

Yes, this is true. In render state there is no context. Context will appear after. I know how to fix it, need to move all static constructions with this or this.context into spots. Here is working example: http://jsfiddle.net/z8pzsdyv/12/ But note, what there is no dynamic bindings with context in template: https://github.com/monkberry/monkberry/blob/master/monkberry.js#L75

francescoagati commented 8 years ago

yes is nice for using some context also in printing variables

francescoagati commented 8 years ago

but i get error also with filters at the first rendering if i call a filter

antonmedv commented 8 years ago

but i get error also with filters at the first rendering if i call a filter

True. You can add a variable to call.

That purpose of doing stuff like this?

francescoagati commented 8 years ago

i wanna pass context and filters to template. but whe the template is rendered i get an error