U
U
urfinjazz2016-04-22 02:13:25
Yii
urfinjazz, 2016-04-22 02:13:25

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

1 answer(s)
M
Maxim Fedorov, 2016-04-22
@urfinjazz

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 question

Ask a Question

731 491 924 answers to any question