Answer the question
In order to leave comments, you need to log in
How to dynamically add a new block to a page?
How to dynamically add a new block to a page?
In the project I use bem-bl.
I can't find in the documentation how to do it.
Answer the question
In order to leave comments, you need to log in
BEMDOM.append("where", BEMHTML.apply({ block : 'bla' }));
or for example some domElem.append(BEMHTML.apply({ block : 'bla' }));
BEMDOM is an i-bem_dom dependency. BEMHTML, for example, can be accessed by including *.bemhtml.js. In your case, there may be a slightly different append, but the most important is BEMHTML.apply
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question