How to fetch file specific js and css through assetbundle inherited class

I’ve created a assets class which inherits the assetbundle class to load my css and js in the php view pages and i am importing this class to access my js and css and its working fine.

my question that i’ve some more js and css which are file specific (works on only selected file) how can i import those files using the assetsbundle class i’ve created? is it possible to do so?

Possible, Separate asset bundle class and load into specific views when required.

So if i need a separate js or css for more than one files so i need to create separate asset bundle class for every page?

Not multiple asset bundle if there is same css/js required. You need to just register particular asset bundle in view where required.

what if the js and css are different for the respective page?

Then multiple asset bundle or include css/js directly into the file.

So i am registering my js using:

$this->registerJsFile(‘file path’);
is it correct?

And what should be the ideal path for accessing the javascript which are a module?

This is correct as long as it is for particular views.

Javascript isn’t a module, do you mean accessing a js file inside module?

Yes that’s what i meant

Does not matter, you can provide path to js file in registerJsFile() and you are good. Normally JS files accessed in Views, Do you plan to access js file somewhere else?