Vue.Js Open link in new tab
Vue.Js Open link in new tab- To open a link in a new tab in Vue.js, you can use either the HTML "target" attribute set to "_blank" in the anchor tag or use the JavaScript "window.open" method to open the link in a new window. With the target attribute, the link will be opened in a new tab by default if the user's browser settings allow it.
Thanks for your feedback!
Your contributions will help us to improve service.
Vue.Js Open External Links In New tab
Open link in new tab Example
If you face performance issue you can use rel="noreferrer noopener" attribute as below.
Open Link in New tab using "window.open"
This code imports the Vue.js library, creates a Vue.js application, and adds a button to the webpage. When the button is clicked, it opens a new window to the specified URL using the window.open()
method. The data()
method defines an object with a url
property set to the URL of fontawesomeicons.com, and the goToLink()
method opens that URL in a new window.