Component
<aura:component implements="lightning:availableForFlowScreens" access="global">
<lightning:button variant="brand" label="Find My Closer" title="Find My Closer" onclick="{! c.navigate }" />
</aura:component>
Controller:
({
navigate : function(component, event, helper) {
var urlEvent = $A.get("e.force:navigateToURL");
urlEvent.setParams({
"url": 'https://www.google.com'
});
urlEvent.fire();
}
})
Any help is appreciated.
Thanks in advance!​Hi Matt Hitt
if you found this answer helpful then please mark it as best answer so it can help others. Thanks Akshay// Component//
<aura:component implements="force:appHostable">
<div id="aura-page">
<div class="container">
<ui:button label="gotoURL" press="{!c.gotoURL}" />
</div>
<div class="container">
<lightning:button variant="brand" label="Find My Closer" title="Find My Closer" onclick="{! c.navigate }" />
</div>
</div>
</aura:component>
//Controller//
({
gotoURL : function(component, event, helper) {
helper.gotoURL(component);
},
navigate : function(component, event, helper) {
helper.navigate(component);
}
})
// Helper Controller//
({
gotoURL : function (component) {
var urlEvent = $A.get("e.force:navigateToURL");
urlEvent.setParams({
"url": "/006/o"
});
urlEvent.fire();
},
navigate : function(component) {
var address = '/Salesforce.com+Inc/@37.793779,-122.39448,17z/';
var urlEvent = $A.get("e.force:navigateToURL");
urlEvent.setParams({
"url": 'https://www.google.com/maps/place/' + address
});
urlEvent.fire();
}
})