Unable to use noty in angular

84 Views Asked by At

I have created a notification service using Noty, But It doesnt animate or show properly. Where am I missing?? Do I need to add any script for it?

import { Injectable } from '@angular/core';
declare let require;
const lodash = require('lodash');
const Noty = require('noty');

@Injectable({
  providedIn: 'root'
})
export class NotificationServiceService {

  constructor() { }

  showNotification(text){
    new Noty(lodash.assign({
      text:text,
      type: 'success',
      layout: 'topRight',
      killer:true,
      timeout: 3000,
    })).show();
  }
}

This is the code of the service.

0

There are 0 best solutions below