0.1.1 • Published 1 year ago

ng-confirm-box v0.1.1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

NgConfirm

This library was generated with Angular CLI version 14.2.0.

Features

  • Easy to install
  • Inbuilt Animation
  • configuartion is easy

Install

npm i ng-confirm-box

Setup

  • Add NgConfirmModule to App NgModule

  • import NgConfirmModule in app.module.ts

import { NgModule } from '@angular/core';
import { HeaderComponent } from './component/header/header.component';
import {NgConfirmModule} from 'ng-confirm-box'; <---- to be added

@NgModule({
  declarations: [
    HeaderComponent,

  ],
  imports: [
    NgConfirmModule <---- to be added
  ],

})
export class AppModule { }
  • use the selector in app.component.html file

Use

import { Component } from '@angular/core';
import { NgConfirmService } from 'ng-confirm-box';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {

  constructor(
    private confirmService: NgConfirmService <---to be injected
  ) { }

  ngOnInit(): void {
  }

  deleteEmployee(id: number) {
    this.confirmService.showConfirm("Are you sure want to Delete?",
     () => {
      //your logic if Yes clicked
    },
    () => {
      //yor logic if No clicked
    })
  }

}

Upcoming features

  • Dynamic Themes
  • Dynamic Animation

License

MIT


GitHub @SashikumarYadav  ·  LinkedIn @SashikumarYadav  ·  Medium @SashikumarYadav

0.1.0

1 year ago

0.1.1

1 year ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago