How to use the ionic-angular.Alert.create function in ionic-angular

To help you get started, we’ve selected a few ionic-angular 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 zyra / ionic-native-playground / app / pages / main / main.ts View on Github external
more () : void {
        this.nav.present(Alert.create({
            title: 'About',
            subTitle: 'This application was created by Ibrahim Hadeed',
            buttons: [
                'Close',
                {
                    text: 'View Github Profile',
                    handler: () => {
                        // TODO open inappbrowser here
                    }
                }
            ]
        }));
    }
github dreamfactorysoftware / ionic-sdk / app / services / notification.ts View on Github external
show(type, content) {
        let alert = Alert.create({
            title: type,
            subTitle: content,
            buttons: [{
                text: 'Ok',
                handler: () => {                    
                    let navTransition = alert.dismiss();
                    //if(!flag){return false;}
                    // navTransition.then(() => {
                    //     this.nav.pop();
                    // });
                    return false;
                }
            }]
        });
        this.nav.present(alert);
    }
github airingursb / sunnybaby / app / pages / city-list / city-list.ts View on Github external
itemSelected(item){


		let confirm = Alert.create({
      		title: '晴宝',
      		message: '你确定要取消关注该城市的天气信息吗?',
			buttons: [
				{
				  	text: '取消',
				},
				{
					text: '确定',
					handler: () => {
						var id = item.id;
						this.local.set('distrct' + id, "");
						this.local.set('weather' + id, "");
						this.local.set('temperature' + id, "");
						this.local.set('picture' + id, "");
						this.local.get('num').then((result) => {
							console.log('num => ' + result);
github rossmartin / video-editor-ionic2 / app / pages / settings / settings.js View on Github external
showOptionInfo() {
    let alert = Alert.create({
      title: 'Width & Height Options',
      subTitle: 'When the width and height options are set to 0 your video will be transcoded with its original dimensions.',
      buttons: ['Gotcha']
    });
    this.nav.present(alert);
  }
}
github lhzbxx / Follow3 / mobile / app / pages / auth / login&register.js View on Github external
.then(function () {
                let t = Alert.create({
                    title: '修改成功!',
                    subTitle: '已向您邮箱发送一封确认邮件,确认后即修改成功。',
                    buttons: [{
                        text: 'OK',
                        handler: () => {
                            context.close();
                        }
                    }]
                });
                context.nav.present(t);
            });
    }
github lhzbxx / Follow3 / mobile / app / pages / Setting / setting.js View on Github external
checkUpdate() {
        let alert = Alert.create({
            title: '检查更新',
            buttons: ['OK']
        });
        this.data.version(this.nav)
            .then(
                data => {
                    alert.setSubTitle('已是最新版本~');
                    this.nav.present(alert);
                }
            )
            .catch(
                data => {
                    alert.setSubTitle('需要更新!');
                    this.nav.present(alert);
                }
            )
github XueRainey / Ioniclub / app / pages / editor / editor.ts View on Github external
addAttach(){
    let alert = Alert.create({
      title: 'Login',
      inputs: [
        {
          name: 'title',
          placeholder: '标题'
        },
        {
          name: 'url',
          value:'http://',
          type: 'url'
        }
      ],
      buttons: [
        {
          text: '取消',
          role: 'cancel'
github gigocabrera / MoneyLeash2 / app / pages / account / account.ts View on Github external
changeUsername() {
    let alert = Alert.create({
      title: 'Change Username',
      buttons: [
        'Cancel'
      ]
    });
    alert.addInput({
      name: 'username',
      value: this.username,
      placeholder: 'username'
    });
    alert.addButton({
      text: 'Ok',
      handler: data => {
        this.userData.setUsername(data.username);
        this.getUsername();
      }
github srehanuddin / Ionic2-ResturantApp / app / pages / cart / cart.ts View on Github external
quantityMinus(item){
        if(item.quantity > 1){
            this.cartService.quantityMinus(item);
        } else {
            let alert = Alert.create({
                title: 'Error',
                subTitle: 'Quantity is 1, you cant reduce it, if you want to remove, please press remove button.',
                buttons: ['Ok']
            });
            this.nav.present(alert);
        }
    }
github dtaalbers / ionic-example-app / file-transfer-upload / app / pages / uploading / uploading.ts View on Github external
constructor(private nav: NavController, 
                private navParams: NavParams,
                private plugins: Plugins,
                private ngZone: NgZone) {  
                    
        this.images = this.navParams.get("images");        
        if(!this.images || this.images.length == 0) {
            let alert = Alert.create({
                title: "Error",
                subTitle: "No images found to upload",
                buttons: ['Ok']
            });
            nav.present(alert);
            return;
        }      
        
        this.total = this.images.length;   
        this.upload(this.images[0]);       
    }