Yii2 - Include JS Script Only For Specific View

后端 未结 3 2357
醉梦人生
醉梦人生 2021-02-20 09:07

I want to include my js script specific.js for a specific view having action id specific-action-id. I don\'t want the specific.js to be in

3条回答
  •  死守一世寂寞
    2021-02-20 09:17

    @soju is right. But you also can create specific asset bundles for use specific views. Your specific js files can be a file group on this situation you can use asset bundles and can use any views which you want.

提交回复
热议问题