Answer the question
In order to leave comments, you need to log in
Yii2 how to change js connection order?
Actually the question is in the title. Thanks in advance.
Answer the question
In order to leave comments, you need to log in
If js files are connected via Asset Manager then www.yiiframework.com/doc-2.0/guide-assets.html
That is, you create your own AssetManager inherited from AssetBundle and register it ( registerAssetBundle ).
Well, or you can just write everything in the header)
If dynamically loaded, then this is how you can:
Read:
registerJs()-detail
registerJsFile()-detail
$search = <<< JS
... your JS code here
JS;
$this->registerJs($search, View::POS_READY);
// where $position can be View::POS_READY (the default),
// or View::POS_HEAD, View::POS_BEGIN, View::POS_END
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question