How to use the tns-core-modules/ui/dialogs.alert function in tns-core-modules

To help you get started, we’ve selected a few tns-core-modules examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github EddyVerbruggen / nativescript-plugin-firebase / demo / app / main-view-model.ts View on Github external
public doSetUserId(): void {
    // just for fun: showing usage of 'firebase.crashlytics' instead of 'firebaseCrashlytics'
    firebase.crashlytics.setUserId("user#42");

    alert({
      title: "User id changed",
      message: "Log a new message and check firebase console",
      okButtonText: "Okay"
    });
  }
}
github NativeScript / NativeScript / apps / app / ui-tests-app / test-page-main-view-model.ts View on Github external
protected navigateToExample(exampleFullPath: string) {
        try {
            frame.topmost().navigate(TestPageMainViewModel.APP_NAME + "/" + exampleFullPath);
        } catch (error) {
            alert("Cannot find example: " + exampleFullPath);

        }
    }
github EddyVerbruggen / nativescript-printer / demo / app / main-view-model.ts View on Github external
this.printer.isSupported().then((supported) => {
      console.log("supported? " + supported);
      alert(supported ? "Yep!" : "Nope :(");
    }, (error) => {
      alert("Error: " + error);
github xuhcc / beancount-mobile / src / app / shared / beancount-file-picker.ts View on Github external
.then((selection: ImageAsset[]) => {
            const filePath = selection[0].android;
            if (!filePath) {
                alert('Failed to access the selected file.');
            }
            return filePath;
        })
        .catch((error) => console.warn(error));
github NativeScript / NativeScript / apps / app / gallery-app / views / dialogs.ts View on Github external
export function alertWithNumberTapped(args) {
    dialogs.alert(1);
}
github TeamHive / nativescript-pspdfkit / demo / app / main-view-model.ts View on Github external
getName() {
    const pdf: any = frame.topmost().getViewById('pdf');
    dialogs.alert(pdf.getFormField('Given Name Text Box') || 'Nada');
  }
github NativeScript / NativeScript / apps / app / gallery-app / views / dialogs.ts View on Github external
export function alertWithOptionsTapped(args) {
    dialogs.alert({
        title: "Alert Title",
        message: "Hi there!",
        okButtonText: "Close"
    });
}
github tjvantoll / GOChecklists / src / app / dex / dex-helper.tns.ts View on Github external
static showError(message) {
    alert({
      title: "GOChecklists",
      message: message,
      okButtonText: "OK"
    });
  }