0.0.28 • Published 4 years ago

@dev-monster/ionic-angular-controller v0.0.28

Weekly downloads
29
License
ISC
Repository
-
Last release
4 years ago

@dev-monster/ionic-angualr-controller

This library is expansions of ionic4 controllers. ion-alert, ion-modal, ion-popover and ion-toast.

main functions

  • Web browsers & android back button : Controllers can be dismissed by press backbutton on browsers and android.

  • IE browser design fix : IE11's ToastControllers position and animation fix.

It is unstable expansion. So use carefully.

install

npm install --save @dev-monster/ionic-angualr-controller

Usage

app.module.ts

import { MonIonControllerModule } from '@dev-monster/ionic-angular-controller';

@NgModule({
  ...
  imports: [
    ...
    MonIonControllerModule
    ...
    ],
  ...
})
export class AppModule {}

and then any page's modult.ts to use this controllers. These are allmost same usage as ion-alert, ion-modal, ion-popover and ion-toast.

monster-alert-controller

import { MonAlertController } from '@dev-monster/ionic-angular-controller';

export class HomePage implements OnInit {
  constructor(
    private alertCtrl: MonAlertController
  ) { }

  async ngOnInit() {
    const alert = await this.alertCtrl.create({
      header: `Monster Ionic Alert`,
      message: 'It is Monster Ionic Alert',
      buttons: [
        {
          text: 'cancel'
        },
        {
          text: 'close alertcontroller',
          handler: () => {
            this.alertCtrl.dismiss();
            return false;
          }
        },
        {
          text: 'close this alert',
          handler: () => {
            alert.dismiss();
            return false;
          }
        },
        {
          text: 'open one more',
          handler: () => {
            this.openAlert();
            return false;
          }
        }
      ]
    });
    await alert.present();
  }
}

monster-modal-controller

import { MonAlertController } from '@dev-monster/ionic-angular-controller';

export class HomePage implements OnInit {
  constructor(
    private alertCtrl: MonAlertController
  ) { }

  async ngOnInit() {
    const modal = await this.modalCtrl.create({
      component: ModalSampleComponent
    });
    await modal.present();
  }
}

monster-popover-controller

import { MonAlertController } from '@dev-monster/ionic-angular-controller';

export class HomePage implements OnInit {
  constructor(
    private alertCtrl: MonAlertController
  ) { }

  async ngOnInit() {
    const popover = await this.popoverCtrl.create({
      component: PopoverSampleComponent,
      event: ev
    });
    await popover.present();
  }
}
0.0.28

4 years ago

0.0.27

4 years ago

0.0.26

4 years ago

0.0.25

4 years ago

0.0.22

4 years ago

0.0.23

4 years ago

0.0.24

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.15

4 years ago

0.0.16

4 years ago

0.0.13

4 years ago

0.0.14

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.0

4 years ago