Closed a-x- closed 8 years ago
You may be surprised, but here is live example of what you want.
no, it's not
i have to proxy all params into block's elems now
i want access all block's params in its elems via API, w/o proxing
Это частый кейс, и проксирование обычно тривиально и только засоряет шаблоны
Can you show more examples?
@a-x- thank you for your feedback!
Can you show more examples?
here: https://gist.github.com/a-x-/a380c1f4d5d0dc997e7a
we set global ctx (this.params = this.ctx.params
) and we use it around wide block elems
in this file and in other block's bemhtml
s
now i need proxy ctx in elems stupid example (Fixed) (DEMO):
In ideal world:
p.s. i understand, that global vars are evil, buuut...