How to use the nativescript-fancyalert.TNSFancyAlert function in nativescript-fancyalert

To help you get started, we’ve selected a few nativescript-fancyalert 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 NathanWalker / ShoutOutPlay / app / shared / core / services / fancyalert.service.ts View on Github external
// angular
import {Injectable, NgZone} from '@angular/core';

// libs
import {Store} from '@ngrx/store';

// nativescript
import {Color} from 'color';
import {isIOS} from 'platform';
import * as dialogs from 'ui/dialogs';

var TNSFancyAlert, TNSFancyAlertButton;

if (isIOS) {
  var fAlerts = require('nativescript-fancyalert');
  TNSFancyAlert = fAlerts.TNSFancyAlert;
  TNSFancyAlertButton = fAlerts.TNSFancyAlertButton;
} else {
  // android
  TNSFancyAlertButton = (function () {
    function TNSFancyAlertButton(model) {
        if (model) {
            this.label = model.label;
            this.action = model.action;
        }
    }
    return TNSFancyAlertButton;
  }());
}

// app
import {ColorService} from './color.service';