如何在Angular中使用Noty库

时间:2019-08-12 07:10:47

标签: angular noty

Noty是一个很棒的库,用于在应用程序中显示通知,我现在尝试在我的角度应用程序中使用它

注意Noty Documentation是由npm安装的,并导入我的组件中

import * as Noty from 'noty';

并在 ngOnInit

中使用它
new Noty({
      text: 'NOTY - a dependency-free notification library!',
  }).show();

但是当我运行应用程序时,它无法正常工作,只是在div.noty_body标签和完全不使用的CSS类中显示我的消息

0 个答案:

没有答案