Sweetalert: Angular 2 ์•ฑ์—์„œ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๋‚˜์š”?

์— ๋งŒ๋“  2017๋…„ 01์›” 10์ผ  ยท  4์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: t4t5/sweetalert

Angular 2 ์•ฑ์—์„œ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๋‚˜์š”?

$ npm i -D sweetalert

import {  sweetalert } from './sweetalert';

# ??? import 

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๋‚˜๋Š” ๊ทธ๊ฒƒ์„ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

import swal from 'sweetalert';

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

๋ชจ๋“  4 ๋Œ“๊ธ€

Script ํƒœ๊ทธ๋ฅผ ์ •์ƒ์ ์œผ๋กœ ์‚ฌ์šฉํ•œ ๋‹ค์Œ ts ํŒŒ์ผ์—์„œ swal()์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

๋‚˜๋Š” ๊ทธ๊ฒƒ์„ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

import swal from 'sweetalert';

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

์ •๋ง ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

+1

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰