Uncategorized

How to get BASE URL in LWC

We actually don’t need BASE URL when we are using relative URL to work on <a/> tag. However we do need BASE URL when working on absolute URL.

Usually when working on a record, we have record ID, but we need to redirect using a <a/> tag on click of the name. and We may some time need to generate absolute URL and append record if to it. In this blog we will see how we can get BASE URL in lightning web component’s Javascript file.

Continue reading “How to get BASE URL in LWC”