I am trying to work Angular2 with Typescript and SystemJS, but I am having import issues.
With this import (or with any other Angular2 import)
import {bootstrap} from 'angular2/platform/browser';
I get Webstorm and tsc compiler errors (WS: cannot resolve directory, tsc: cannot find module), although there is Angular2 in jspm_packages / npm / angular2 @ 2.0.0-beta. 0
my directory structure
browser components app.component.ts bootstrap.ts index.html node_modules jspm_packages jspm.config.js package.json tsconfig.json
tsconfig.json
{ "compilerOptions": { "target": "ES5", "module": "system", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "removeComments": false, "noImplicitAny": false }, "filesGlob": [ "!./node_modules/**/*.ts", "!./jspm_packages/**/*.ts", "./**/*.ts" ] }
and config in jspm.config.js
System.config({ defaultJSExtensions: true, transpiler: "typescript", paths: { "github:*": "../jspm_packages/github/*", "npm:*": "../jspm_packages/npm/*" }})
This code somehow works, but the compiler seems confused, is there a better (or right) way to do this? Thanks
source share