All Projects → seiyria → Ng2 Sweetalert2

seiyria / Ng2 Sweetalert2

Licence: mit
A sweetalert2 service for angular2.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ng2 Sweetalert2

ng-seed
Simple Angular seed project with commonly used features.
Stars: ✭ 12 (-75.51%)
Mutual labels:  angular2, ng2
angular2-cookie-law
Angular2+ component that provides a banner to inform users about cookie law
Stars: ✭ 38 (-22.45%)
Mutual labels:  angular2, ng2
ng-elm
Write Angular components in Elm.
Stars: ✭ 41 (-16.33%)
Mutual labels:  angular2, ng2
awesome-angular
💖 A list of awesome Angular (2️⃣➕) resources
Stars: ✭ 61 (+24.49%)
Mutual labels:  angular2, ng2
Ngx Admin
Customizable admin dashboard template based on Angular 10+
Stars: ✭ 23,286 (+47422.45%)
Mutual labels:  ng2, angular2
ng-leaflet
Angular 2 component for Leaflet 1.x (WIP - Help Wanted)
Stars: ✭ 16 (-67.35%)
Mutual labels:  angular2, ng2
ng2-fused
FuseBox plugins and utilities for building Angular2 applications.
Stars: ✭ 13 (-73.47%)
Mutual labels:  angular2, ng2
ic-datepicker
Angular (2+) datepicker component
Stars: ✭ 27 (-44.9%)
Mutual labels:  angular2, ng2
Cc
一个基于angular5.0.0+ng-bootstrap1.0.0-beta.8+bootstrap4.0.0-beta.2+scss的后台管理系统界面(没基础的同学请先自学基础,谢谢!)
Stars: ✭ 416 (+748.98%)
Mutual labels:  ng2, angular2
Angular
UI-Router for Angular: State-based routing for Angular (v2+)
Stars: ✭ 287 (+485.71%)
Mutual labels:  ng2, angular2
angular-progress-http
[DEPRECATED] Use @angular/common/http instead
Stars: ✭ 43 (-12.24%)
Mutual labels:  angular2, ng2
Angular2 Carousel
An lightweight , touchable and responsive library to create a carousel for angular 2 / 4 / 5
Stars: ✭ 26 (-46.94%)
Mutual labels:  ng2, angular2
ng2-storage
A local and session storage wrapper for angular 2.
Stars: ✭ 14 (-71.43%)
Mutual labels:  angular2, ng2
ng2-STOMP-Over-WebSocket
STOMP Over WebSocket service for angular2
Stars: ✭ 35 (-28.57%)
Mutual labels:  angular2, ng2
ng2-fontawesome
An easy-to-use directive for font awesome icons.
Stars: ✭ 20 (-59.18%)
Mutual labels:  angular2, ng2
ng2-gravatar
Angular2 gravatar directive
Stars: ✭ 21 (-57.14%)
Mutual labels:  angular2, ng2
angular2-signature-pad
Signature pad component for Angular 2.x and above.
Stars: ✭ 17 (-65.31%)
Mutual labels:  angular2, ng2
ng-data-picker
🏄🏼 A data picker based on Angular 4+ (like native datetime picker of iOS)
Stars: ✭ 24 (-51.02%)
Mutual labels:  angular2, ng2
ngx-magicsearch
Magic Search/Faceted Search Library for Angular 2
Stars: ✭ 19 (-61.22%)
Mutual labels:  angular2, ng2
Ngx Echarts
An angular (ver >= 2.x) directive for ECharts (ver >= 3.x)
Stars: ✭ 820 (+1573.47%)
Mutual labels:  ng2, angular2

DEPRECATED

This library should not be used. Either import swal directly or use this fork instead.

ng2-sweetalert2

A service wrapping sweetalert2 for angular 2.

Install

npm i -s ng2-sweetalert2

Usage

First, make sure you have a CSS loader set up for webpack, like so:

{
  test: /\.css/,
  loader: 'style!css'
},

Next, inject SweetAlertService into a component:

import { SweetAlertService } from 'ng2-sweetalert2';

@Component({
  providers: [SweetAlertService]
})
export class MyComponent {

  static get parameters() {
    return [[SweetAlertService]];
  }

  constructor(swal) {
    this.swalService = swal;
  }

API

See limonte/sweetalert2 for examples.

Function Arguments Description
swal any Create a generic swal with any arguments.
prompt object Create a swal that prompts user with a basic text entry field.
confirm object Create a swal that confirms a user action.
alert object Create a swal that alerts a user of something that happened.
question object Wrapper for alert that sets type to question.
success object Wrapper for alert that sets type to success.
error object Wrapper for alert that sets type to error.
warn object Wrapper for alert that sets type to warn.
info object Wrapper for alert that sets type to info.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].