Sweetalert: how to use it in angular 2 app?

Created on 10 Jan 2017  ·  4Comments  ·  Source: t4t5/sweetalert

how to use it in angular 2 app?

$ npm i -D sweetalert

import {  sweetalert } from './sweetalert';

# ??? import 

Most helpful comment

I'm using it as such:

import swal from 'sweetalert';

// then later in the code
swal("Here's a message!")

All 4 comments

I used Script tag normally and then I use swal() in ts files.

I'm using it as such:

import swal from 'sweetalert';

// then later in the code
swal("Here's a message!")

thanks a lot!

+1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

killernova picture killernova  ·  11Comments

daybaryour picture daybaryour  ·  13Comments

koullislp picture koullislp  ·  9Comments

voviks21 picture voviks21  ·  9Comments

stefanoschrs picture stefanoschrs  ·  9Comments