Instagram

About Me

Photo Profile
Meetanshi Architecture Designer

Meetanshi is found based on providing the best Magento Extensions and Customized eCommerce Business Solutions perfected to the users’ needs. Our Happy users make us Happy. Complete satisfaction to our clients is what drives and motivates us to work hard. Read More

Sunday, September 25, 2022

How to Get Magento 2 URL in JS File

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/


No comments:
Write comments


Get more of our update !