Answer the question
In order to leave comments, you need to log in
How to use YM modules?
When using i-bem.js technology, you have to use YM modules.
Modules in dependencies that have i-bem are executed without using module.require, it is enough to declare them through define. There are cases when there is no need to specify i-bem in the dependencies and you just need to write the YM module, does it turn out that it should be launched immediately after the declaration?
Example: It is
necessary to display alert on the page. In YM modules it looks like this:
modules.define('WOW', function(provide) {
provide({
init_wow : function() {
alert(123);
}
});
});
modules.require('WOW',function(init){
init.init_wow();
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question