How to add JavaScript inside controller? I don't want to call build form. I can call css or js in src/Form/Form.php
but I want to call css or js inside Controller src/Controller/Controller.php
This process I am using to call css and js in Form page
public function buildForm(array $form, FormStateInterface $form_state,$cid = NULL)
{
$form['#attached']['library'][] = 'cssjs/val_master';
}
Could anyone write some example to call css or js inside Controller
Thanks.