An Interest In:
Web News this Week
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
September 20, 2022 07:50 am GMT
Original Link: https://dev.to/gulsenkeskin/angular-alertifyjs-configuration-e2
Angular Alertifyjs Configuration
1- install alertifyjs:
npm install alertifyjs --save
2- Add to style.css:
@import "../node_modules/alertifyjs/build/css/alertify.css";
@import "../node_modules/alertifyjs/build/css/themes/bootstrap.min.css";
@import "../node_modules/alertifyjs//build/css/themes/default.min.css";
3- import alertifyjs to componentName.component.ts file you want to use:
import * as alertifyjs from 'alertifyjs';
4- Create alertifytype.d.ts file in src directory
and add in the file:
declare module 'alertifyjs';
5- Add to tsconfig.json file:
"typeRoots": ["node_modules/@types","src/alertifytype.d.ts"],
6- use in component:
successfully:alertifyjs.successfully('message');
or error:alertifyjs.error('message')
Original Link: https://dev.to/gulsenkeskin/angular-alertifyjs-configuration-e2
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To