bem / bem-xjst

bem-xjst (eXtensible JavaScript Templates): declarative template engine for the browser and server
https://bem.github.io/bem-xjst
Other
115 stars 47 forks source link

js() mode should set js params to mixed block #338

Closed miripiruni closed 8 years ago

miripiruni commented 8 years ago

Test case: https://goo.gl/8LK0IQ

BEMJSON:

([
    { block: 'b', mix: { block: 'mixed' } },
    { block: 'b', mix: { block: 'mixed', js: { test: 1 } } },
]);

Templates:

block('mixed').js()({ test: 1 });

Current result:

<div class="b mixed"></div>
<div class="b mixed i-bem" data-bem='{"mixed":{"test":1}}'></div>

Expected result:

<div class="b mixed i-bem" data-bem='{"mixed":{"test":1}}'></div>
<div class="b mixed i-bem" data-bem='{"mixed":{"test":1}}'></div>

@zxqfox @tadatuta

tadatuta commented 8 years ago

Same as https://github.com/bem/bem-xjst/issues/147