I am creating an Angular 2 application with version 2.0.0-alpha.46 and I trying to import the toastr module.
I have downloaded the library and also downloaded the de
I think that the toastr.min.js
file doesn't contain a module at all. My understanding is that TypeScript definition files help you to define the methods and structures used by the toastr library. This is helpful within your IDE for code completion. This definition file doesn't actually create a module that can be use at runtime...
This means that you can use directly the toastr
object directly without having to import it like this: import * as toastr from '...';
.
Here is the corresponding plunkr: https://plnkr.co/edit/wzdoisKBrZYTeSX8r7Nd?p=preview.
Hope that makes sense. Thierry