W
W
wolfcruel972019-03-19 14:26:59
Yii
wolfcruel97, 2019-03-19 14:26:59

Loading system scripts at the very bottom?

How to make scripts:
/assets/7eac2f0e/yii.js
/assets/7eac2f0e/yii.validation.js
/assets/7eac2f0e/yii.activeForm.js
Load after all my scripts?

class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [
        'css/style.min.css',
        'css/common.css'
    ];
    public $js = [
        'js/jquery/jquery-3.2.1.min.js',
        'js/popper/popper.min.js',
        'js/bootstrap/dist/js/bootstrap.min.js',
        'js/perfect-scrollbar.jquery.min.js',
        'js/waves.js',
        'js/sidebarmenu.js',
        'js/sticky-kit-master/dist/sticky-kit.min.js',
        'js/sparkline/jquery.sparkline.min.js',
        'js/custom.js',
        'js/jquery-sparkline/jquery.sparkline.min.js'
    ];
    public $depends = [];
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2019-03-19
@webinar

Take out your scripts in a separate AssetBundle, dependencies that are needed earlier in another and specify the first as a dependency in another
. But usually they try to achieve the opposite. Do you understand exactly why you need it and what exactly it is?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question