Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

selcukkutuk/ngx-sweetalert2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngx-sweetalert2

Sweetalert2 for angular x cli application.

Install

npm i -s ngx-sweetalert2

Usage

Add the following sections to the .angular.cli.json file.

"styles": [
"../node_modules/sweetalert2/dist/sweetalert2.css"
],
"scripts": [
"../node_modules/sweetalert2/dist/sweetalert2.js"
],

Next, inject SweetAlertService into a component or module:

import { SweetAlertService } from 'ngx-sweetalert2';

@Component({
  providers: [SweetAlertService]
})
export class MyComponent {
  constructor(private _swal2: SweetAlertService) {
    this._swal2.success({ title: 'This is a alert' });
  }
}
import { SweetAlertService } from 'ngx-sweetalert2';

@NgModule({
  providers: [SweetAlertService]
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published