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
specific.js
specific-action-id
You should simply register this js file in your view, e.g. :
$this->registerJsFile('@web/js/specific.js');
Read more : http://www.yiiframework.com/doc-2.0/guide-output-client-scripts.html#registering-scripts