• Pavan Nichenametla
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi

I am having a piece of code that will open an external URL.

whhen I click the button it will open the URL in a web tab on the browser.

here's the code
 <a href="javascript:void(0);" onclick="{!c.openMyProviderPage}">Find provider</a>  

In the controller of the component

 openProviderPage : function(component, event, helper) {
        debugger;
         var pageUrl = component.get("v.findMyProviderURL");
        var urlEvent = $A.get("e.force:navigateToURL");
        urlEvent.setParams({"url": pageUrl });
        urlEvent.fire();
       
I do not want the new URL to open in a separate browser window i.e the new URL should open as a subTab inline.

I hope my requirement is clear.

Please help me out at earliest.