我学习angular2。 已安装的node.js,NPM,打字稿。
我跑npm start
显示错误:
app/my-component.component.ts(1,25): error TS2307: Cannot find module 'angular2/core'.
我-component.component.ts
import {Component} from "angular2/core";
@Component({
selector: 'my-component',
template: `
This is my component!
`
})
export class MyComponentComponent {
}
的index.html
<html>
<head>
<title>Angular 2 QuickStart</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>
<body>
<my-app>Loading...</my-app>
</body>
</html>
我不能已了解为什么不能发现angular2 /核心是什么? 你能帮助请