16 Jun
16Jun

The post shows the technique to get Magento 2 URL in the JS document. For instance, you are trapped in a circumstance where you need to get url from .js record and add it with your module regulator connect from. Indeed, it is absurd to expect to utilize the block to get the url.

You might expect to get the URL in JS record and it isn't prescribed to utilize the static URL similarly as with time, the URL key might change and the static worth will give you the mistake.

Subsequently, carry out the beneath technique to get Magento 2 URL for JS file.

For more Info. visit: https://meetanshi.com/blog/get-magento-2-url-in-js-file/



Comments
* The email will not be published on the website.
I BUILT MY SITE FOR FREE USING