function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mayank_SharmaMayank_Sharma 

NavigateToURL not working

<ui:button label="Export to PDF" 
                       class="slds-button slds-button--neutral"
                       press="{!c.navigate}"
                       labelClass="label"/>

on click calling below navigate and trying to open random youtube link. However I need to open VF page. Any suggestions what is wrong 

 navigate : function (component, event, helper) {
    var urlEvent = $A.get("e.force:navigateToURL");
    console.log('urlEvent is '+urlEvent);
         var myUrl = 'https://www.youtube.com/watch?v=gOmL6ysIZrE';
    urlEvent.setParams({
        "url": myUrl
    });    
    urlEvent.fire();
    /*window.location('/006/o');*/
    }