Newer
Older
GestionHoteleria / src / app / extra-component / toastr / toastr.component.ts
James Cuadrado on 23 May 2021 568 bytes new repository
import { Component } from '@angular/core';
import { ToastrService } from 'ngx-toastr';

@Component({
  templateUrl: './toastr.component.html'
})
export class ToastrComponent {
  constructor(private toastr: ToastrService) {}

  showSuccess() {
    this.toastr.success('You are awesome!', 'Success!');
  }
  

  showError() {
    this.toastr.error('This is not good!', 'Oops!');
  }

  showWarning() {
    this.toastr.warning('You are being warned.', 'Alert!');
  }

  showInfo() {
    this.toastr.info('Just some information for you.');
  }
}