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 definitely typed file as well.
In my html page, I add a <script>
tag for the .js file:
<script src="./src/libs/toastr/toastr.min.js"></script>
In Visual Studio Code, I try to import the module like so:
import * as toastr from 'toastr';
I am then able to call toastr.info('message') in my component - I even get intellisense; However, when i actually try to load the webpage I get a 404 /src/toastr not found error.
If I try to get explicit about finding the toastr definitely typed file:
import * as toastr from '../../definitions/toastr/toastr';
I will get "[full path to ts module] is not a module."
I have also tried adding ///<reference path="../../toastr.d.ts" />
to the top of the file I am using to import the module to no avail.
Does anyone have an idea of what may be happening? I am drawing a blank on what I may have wrong. Thanks in advance.