Stuck in a situation where you want to get url from .js file and append it with your module controller link from? The solution is to get Magento 2 URL in JS file.
Attachment 14121
Get the solution at https://meetanshi.com/blog/get-magen...rl-in-js-file/