Javascript 无法将Toaster与TypeScript一起使用

Javascript 无法将Toaster与TypeScript一起使用,javascript,angularjs,typescript,typescript1.5,Javascript,Angularjs,Typescript,Typescript1.5,我一直在用angular和typescript,但不能用angular烤面包机和typescript一起使用任何想法 export class notification { constructor(private test: ngtoaster.IToasterService) { //Error here When I load toaster service if remove that contstructor parma works fine

我一直在用angular和typescript,但不能用angular烤面包机和typescript一起使用任何想法

export class notification {


        constructor(private test: ngtoaster.IToasterService) {
            //Error here When I load toaster service if remove that contstructor parma works fine

           //private toaster: ngtoaster.IToasterService
           // this.toaster.toast.timeout = 3000;
           // this.toaster.toast.type = EnergyTechApp.Entity.Constants.info;
           // this.toaster.toast.showCloseButton = true;
        }
}

错误:未知提供程序:toastrConfigProvider您可以向我们展示您包含的服务的“所有模块和所有地方”吗?因为该错误消息往往意味着它没有作为依赖项包含在模块中,或者它没有在html文件中引用。您的错误不是typescript错误。这是一个角度误差。我与d.ts文件无关。我说的是必须在html文件中引用的
ngToast.js
文件。好的,我已经引用了它!!我在所有模块中都引用了“ngToaster”你是说这里的文件???我引用的是这个,您是否尝试将
test
重命名为
toastr
?另外,根据文档,您应该使用
toastr
作为模块的依赖项,而不是
ngToaster