Answer the question
In order to leave comments, you need to log in
How to add a js file to the end of other js files in yii2?
Hello!
I connect the template inside another template <?= $this->render('_template'); ?>
,
in this template I connect the js file, which should be after the js files that are connected in the parent template. All js files must be included after BODY.
Is there a solution? How can I use AssetBundle in this case?
Thanks to!
Answer the question
In order to leave comments, you need to log in
In the parent file, group all files in AssetBundle
https://github.com/yiisoft/yii2/blob/master/docs/g...
And in the child template, connect via registerJsFile indicating the dependency on the created AssetBundle
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question