回答
有可供角2
https://github.com/seiyria/ng2-sweetalert2
import { SweetAlertService } from 'ng2-sweetalert2';
@Component({
providers: [SweetAlertService]
})
export class MyComponent {
static get parameters() {
return [[SweetAlertService]];
}
constructor(swal) {
this.swalService = swal;
}
時sweetalert2.min.css裝起來這將工作一個甜蜜的警報模塊。
編輯九月:2017年
這棄用截至2017年八月
的您應該使用https://github.com/toverux/ngsweetalert2或https://www.npmjs.com/package/sweetalert2
好友,這件事情已於2017年8月6日棄用,我在2017年2月24日發佈了我的答案。 –
沒有問題,但想你之前downvote –
這個答案好 https://stackoverflow.com/a/39891375/5647368 – Taha
- 1. 如何在離子2中使用pdfmake?
- 2. 我們如何在angular2或4中使用bootstrap-sweetalert庫?
- 3. 如何在離子2/Angular2/typescript中聲明多個變量?
- 4. 在離子2中使用非離子原生插件2
- 5. 如何使用離子排和離子排對準離子2中的元素?
- 6. AdMob中使用離子2
- 7. 如何使用angular2和離子2對3列進行校準
- 8. 如何在離子2中使用Scandit插件2
- 9. 如何在離子2中使用lokijs-cordova-fs-adapter 2
- 10. 如何在離子2中使用子字符串
- 11. 如何使用$ filter在離子2
- 12. Angular2-text-ticker-directive在離子2項目中不起作用
- 13. 如何在離子2中使用離子選項卡和離子選項卡2
- 14. 在離子2中使用JQuery
- 15. 在離子2中使用getElementById
- 16. 在離子2中使用Ionicons
- 17. 在離子2中使用windity API
- 18. 如何在使用ionic2和angular2的通知中使用離子切換
- 19. 在離子2中使用非離子原生插件
- 20. 如何在離子2中連續放置多個離子卡?
- 21. 如何使用打字稿禁用離子選擇。離子2
- 22. 如何解析離子2中的JSON?
- 23. 如何解密離子2中的xml?
- 24. 如何在離子2框架中使用ng-upgrade
- 25. 如何在離子2中正確使用(點擊)?
- 26. 如何在離子2 rc0中使用fontawesome?
- 27. 如何在離子2組件模板中使用SASS顏色()?
- 28. 如何在離子2中使用第三方JavaScript庫(pixijs)?
- 29. 如何在離子中使用CORS編寫Angular 2服務?
- 30. 如何在離子2
閱讀https://angular.io/docs/ts/最新/指南/ –