S
S
Sergey Beloventsev2016-04-29 13:47:04
Yii
Sergey Beloventsev, 2016-04-29 13:47:04

How to correctly include scripts in a view?

How can I connect the script after connecting all the scripts (specifically interested in jQuery) I
tried this way.

$this->registerJsFile(Yii::getAlias('@backendWebroot').'/js/morris.min.js',['position' => yii\web\View::POS_READY]);

is not displayed at all, the situation is the same through POS_LOAD.
if so as you understand immediately after the tag

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Grechushnikov, 2016-04-29
@Sergalas

make a separate asset for this set of scripts/styles. set a dependency and just register on the page

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question