These are chat archives for bem/talk

8th
Sep 2014
Vladimir Grinenko
@tadatuta
Sep 08 2014 09:28
@gruzzilkin yep, here we talk just in English
Alex Baumgertner
@alexbaumgertner
Sep 08 2014 09:33
@tadatuta @gruzzilkin oh, yes, thanks. Sorry, but too late to delete them.
Mikhail Batyumov
@sam0var
Sep 08 2014 17:09
I'm new bem user and take lessons from http://ru.bem.info/tutorials/start-with-project-stub/. When I got to the creation of "goods.bemhtml" and copy code it didn't work. I received an error "Only literal or function is allowed in template's body at 910:16
attrs()({"
When I removed "attrs()({ src: this.ctx.url })" code works without pictures. I suspect that there is a difference in the versions of the tools.
Mikhail Batyumov
@sam0var
Sep 08 2014 17:37
I found answer and create issue bem/bem-method#164
Alexej Yaroshevich
@zxqfox
Sep 08 2014 18:14
@sam0var Hey there. Can you try to replace attrs()({...}) with attrs()(function () { return { src: this.ctx.url; }) ?
Mikhail Batyumov
@sam0var
Sep 08 2014 18:45
@zxqfox Hi. Is it joke? Your code is slightly dirty, but if it will fix we get result without errors and images. I create issue in Russian earlier with answer. I think that tutorial should be clean from all errors, because it isn't test or exam.
Alexej Yaroshevich
@zxqfox
Sep 08 2014 19:57
@sam0var No, it's not. I've missed one closing curly, sorry. If it doesn't set src attribute than it's really strange behaviour ;-( I'm confused
Alexej Yaroshevich
@zxqfox
Sep 08 2014 20:17
@sam0var btw. I read your issue. But @tadatuta said the same thing. You should wrap your expression to anonymous function. But if it doesn't work then that's another bug there.