Newbie Que


I have just started learning Yii2 and little confused how to include CSS or JS file in the Views. Also, which is the best place to put CSS or JS files?


Hi, I am using $this->head() function to load mete descriptions on my template layout. However, I can see some default css files which are loaded by this function when I view the page. In yii 1.1 . If I need do disable default script files on my page in yii 1.1 I can add below code

Yii::app()->clientScript->scriptMap=array( ‘jquery.js’=>false, ‘jquery.ui.js’ => false, );

How to achieve this in Yii 2.0?

Check the guide I’ve linked to above.