I want to use Bootbox in my Angular2 project. I searched a lot but there is no any relevant solution for me.
I also tried angular2-modal
but there were many issues while using angular2-modal
, please suggest any good doc/Examples/Demos for the same.
相关问题
- Angular RxJS mergeMap types
- void before promise syntax
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- Ignore Typescript errors in Webpack-dev-server
- How to update placeholder text in ng2-smart-table?
相关文章
- angular脚手架在ie9+下兼容问题
- angular 前端项目 build 报错 "Cannot find module 'le
- Cannot find module 'redux' 怎么解决?
- Angular Material Stepper causes mat-formfield to v
- After upgrade to Angular 9 cannot find variable in
- is there any difference between import { Observabl
- Suppress “Circular dependency detected” suppress w
- How can you get current positional information abo
Step 1: Install bootbox via
npm install bootbox --save
Step 2: If you are using systemjs then include bootbox like:
Step 3: Just put
declare var bootbox:any;
after import all libreries and before component decorator in your component ts file and then use normaly likebootbox.alert("Hello world!");
on any function call.Make sure you have bootstrap and jquery installed and included in index page. jquery should be in first place then after bootstrap.
[Edit]
Alternate Step 3 Instead of
declare var bootbox:any;
, import type type definitions instead: