Exploring Angular2 and Typescript with the help of mgechev's angular2-seed for a new project has been an interesting experience. However, I have encountered a problem along the way.
My intention is to incorporate Numeral into a component, and here are the steps I have taken:
- Numeral was installed using
npm install numeral
- The typing for Numeral was added using
typings install dt~numeraljs --global --save
- In my component, I imported Numeral with
import { numeral } from '/typings/globals/numeraljs';
- The code line
was includedlet num:Number = new Number(numeral().unformat(text));
Everything appeared to transpile successfully. However, upon reaching the browser, the console displayed the following error:
Error: XHR error (404 Not Found) loading http://localhost:5555/typings/globals/numeraljs.js(…)
What am I missing in this process? Is there a step I overlooked to specify to Typescript the location of the actual code?