I just begin with angular2 and typescript and I'm facing an issue. I made a little library in the folder web-project/api:
- package.json
- core.ts
- typings.json
and an angular2 project in /web-project/angular2 based on the Tour-Of-Heroes from the angular website: https://angular.io/docs/ts/latest/
I used npm install ../api and import my class like this:
import { Session } from 'api/core'
That's compile without error or warning. But when I'm trying it in my browser, nothing works and I'm facing an angular error due to an HTTP error -> GET /localhost/api/core Returning 404, of course I don't have any file named core.
So two questions:
- Why my lib is not embedded like my others ts files?
- How to embedded my lib or specified where to find the proper js file?