Open links to external browser
About this task
By default, any hyperlink will open in the in-app browser of the application in Maximo Mobile. So this instructs how to open the link in the user’s default browser application.
Procedure
Step 1: Create a link by declaring link element.
<link on-click="openIBM" label="IBM hyperlink"/>
Step 2: Import the Browser module in AppCustomizations.js file.
import {Browser} from '@maximo/maximo-js-api';
Step 3: Create the on click method to hook the logic that opens the extenal link in AppCustomizations.js file.
openIBM(){let url="https://www.ibm.com/"if(this.app.device.isMaximoMobile) {try{window.cordova.InAppBrowser.open(url, "_system", 'location=yes');} catch(error) {Browser.get().openURL(url);}