typescript - Angular2 import modules Error: TS2307 -
this question has answer here:
i going write simple hello word app angular2 , systemjs import module in phpstorm.
here directory of project:
projectname |--app |--app.ts |--app.js |node_modules |index.html |package.json |tsconfig.json here piece of code:
import { bootstrap } "angular2/platform/browser"; import { component } "angular2/core"; question:
how know find file? when moved node_modules app folder, there comes error.
it's little confusing: angular2/platform/browser , angular2/core names of modules, not names of files. these modules loaded main angular2 script, node_modules/angular2/angular2.min.js or node_modules/angular2/angular2.dev.js.
if code can access angular2.js, can import many different angular modules.
Comments
Post a Comment