Directs the mobile app to open the specified URL in the device's browser.
The openURL()
function returns a Promise that resolves when the navigation is successful.
Supported URL formats:
http(s)://
.mailto:@?subject=
.
The URL to open.
Opens the specified screen.
toScreen()
returns a promise that resolves when the opened screen closes. Learn more about stack navigation.
function toScreen(screenId: string, data: object): Promise<CloseScreenResult>;
Name of the screen to open, as defined in the app editor. Learn more about managing your app's screens.
Data to send to the target screen.
import wixNavigateMobile from "wix-navigate-mobile";
import { getFeedbackCategories } from "./feedbackCategories";
const screenToNavigateTo = "feedback";
const feedbackData = getFeedbackCategories();
wixNavigateMobile.toScreen(screenToNavigateTo, feedbackData).then((result) => {
if (result.error && result.error !== "") {
console.error(result.error);
}
console.log("Data from feedback screen:", result.data);
});