{"id":13697069,"url":"https://github.com/HsuanXyz/ionic2-extend-alert","last_synced_at":"2025-05-03T17:33:03.801Z","repository":{"id":57276082,"uuid":"82540132","full_name":"hsuanxyz/ionic2-extend-alert","owner":"hsuanxyz","description":"Extended version of alert component","archived":false,"fork":false,"pushed_at":"2017-03-02T09:38:28.000Z","size":44,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-10-28T20:52:41.789Z","etag":null,"topics":["auto-cloes","count-down","ionic2","plugin"],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hsuanxyz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-20T09:29:57.000Z","updated_at":"2019-04-10T14:58:56.000Z","dependencies_parsed_at":"2022-09-15T19:13:01.090Z","dependency_job_id":null,"html_url":"https://github.com/hsuanxyz/ionic2-extend-alert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsuanxyz%2Fionic2-extend-alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsuanxyz%2Fionic2-extend-alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsuanxyz%2Fionic2-extend-alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsuanxyz%2Fionic2-extend-alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hsuanxyz","download_url":"https://codeload.github.com/hsuanxyz/ionic2-extend-alert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224369856,"owners_count":17299961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-cloes","count-down","ionic2","plugin"],"created_at":"2024-08-02T18:00:52.283Z","updated_at":"2024-11-13T00:31:24.209Z","avatar_url":"https://github.com/hsuanxyz.png","language":"CSS","funding_links":[],"categories":["Components","UI","Complete projects"],"sub_categories":["Dialog"],"readme":"# ionic2-extend-alert\nIonic2 extended version of alert component\n\n## Extend\n1. Set dialog auto-cancel\n\n![](https://github.com/HsuanXyz/hsuan.github.io/blob/master/assets/ionic2-extend-alert/alert-demo1.gif?raw=true)\n\n## Install\n` npm install ionic2-extend-alert --save`\n\n## Use\nImport module\n```\nimport { NgModule, ErrorHandler } from '@angular/core';\nimport { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';\nimport { MyApp } from './app.component';\n...\nimport { ExtendAlertModule } from 'ionic2-extend-alert'\n\n\n@NgModule({\n  declarations: [\n    MyApp,\n    ...\n  ],\n  imports: [\n    ExtendAlertModule,\n    IonicModule.forRoot(MyApp)\n  ],\n  bootstrap: [IonicApp],\n  entryComponents: [\n    MyApp,\n    ...\n  ],\n  providers: [{provide: ErrorHandler, useClass: IonicErrorHandler}]\n})\nexport class AppModule {}\n```\nYour component\n\n```\nimport { Component } from '@angular/core';\nimport {NavController, NavParams} from 'ionic-angular';\n...\nimport { AlertController } from 'ionic2-extend-alert/dist/alert';\n\n@Component({\n  selector: 'page-home',\n  templateUrl: 'home.html'\n})\nexport class HomePage {\n\n  constructor(\n    ...\n    public alertCtrl: AlertController\n\n  ) {\n  }\n\n\n  presentConfirm() {\n    let alert = this.alertCtrl.create({\n      title: 'Hi!',\n      message: 'Hello Ionic2',\n      buttons: [\n        {\n          text: 'cancel',\n          role: 'cancel',\n          handler: () =\u003e {\n            console.log('Cancel clicked');\n          }\n        },\n        {\n          text: 'ok',\n          time:6000, // set auto-cancel time\n          handler: () =\u003e {\n            console.log('Buy clicked');\n          }\n        }\n      ]\n    });\n    alert.present();\n  }\n}\n```\n\n\n## Extend API\nButton options\n\n| Property | Type | Description |\n| --- | --- | --- |\n| time | number | auto-cancel time |\n\n\n## Environment\n```\nCordova CLI: 6.4.0\nIonic Framework Version: 2.0.0\nIonic CLI Version: 2.1.18\nIonic App Lib Version: 2.1.9\nIonic App Scripts Version: 1.0.0\nios-deploy version: Not installed\nios-sim version: Not installed\nOS: macOS Sierra\nNode Version: v6.9.2\nXcode version: Xcode 8.2.1 Build version 8C1002\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHsuanXyz%2Fionic2-extend-alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHsuanXyz%2Fionic2-extend-alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHsuanXyz%2Fionic2-extend-alert/lists"}