私はログインページを作成しなければなりませんでしたが、それを行う前に、JSONオブジェクトで簡単なHTTP取得を試みました。しかし、ページが、私はこのラインAngular2、HTTPリクエスト
<script src="node_modules/angular2/bundles/http.dev.js"></script>
のindex.htmlで書く場合arror (index):18 Error: (SystemJS) XHR error (404 Not Found) loading
を解決できることを私は読んでいくつかの記事で enter image description here
をロードしませんが、それはありません負荷しないでください。私は
<script src="node_modules/@angular/bundles/http.dev.js"></script>
を試してみましたが、何も助けません。私の輸入では、私は@angular代わりのangular2
のhier私のpackage.jsonである
{
"name": "angular-quickstart",
"version": "1.0.0",
"scripts": {
"start": "tsc && concurrently \"tsc -w\" \"lite-server\" ",
"lite": "lite-server",
"tsc": "tsc",
"tsc:w": "tsc -w"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/angular/angular.io/blob/master/LICENSE"
}
],
"dependencies": {
"@angular/common": "~2.2.0",
"@angular/compiler": "~2.2.0",
"@angular/core": "~2.2.0",
"@angular/forms": "~2.2.0",
"@angular/http": "~2.2.0",
"@angular/platform-browser": "~2.2.0",
"@angular/platform-browser-dynamic": "~2.2.0",
"@angular/router": "~3.2.0",
"@angular/upgrade": "~2.2.0",
"angular-in-memory-web-api": "~0.1.15",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.8",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.39",
"zone.js": "^0.6.25"
},
"devDependencies": {
"@types/core-js": "^0.9.34",
"@types/node": "^6.0.45",
"concurrently": "^3.0.0",
"lite-server": "^2.2.2",
"typescript": "^2.0.3"
}
}
と私のコード https://gist.github.com/anonymous/d3b5f00ed5e9a5d3db603bf6eafb402f と https://gist.github.com/anonymous/d6940887480a6501a539fa15f8de6b9f
を持っているあなたの助けに感謝多くを
は、いくつかのより多くのコードをポストする必要があります。 –
'node_modules'の下に' @ angular'がありますか? –
'packages.json'を投稿できますか? 'npm install'を実行しましたか? –