搜尋

首頁  >  問答  >  主體

前端 - angular官網教學第7個HTTP,找不到angular-in-memory-web-api

我在學習angula中文網第七個教學http時,有一個api介面找不到,遍尋staroverflow跟google無果...

package.json

{
  "name": "test1",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^2.4.0",
    "@angular/compiler": "^2.4.0",
    "@angular/core": "^2.4.0",
    "@angular/forms": "^2.4.0",
    "@angular/http": "^2.4.0",
    "@angular/platform-browser": "^2.4.0",
    "@angular/platform-browser-dynamic": "^2.4.0",
    "@angular/router": "^3.4.0",
    "core-js": "^2.4.1",
    "rxjs": "^5.1.0",
    "zone.js": "^0.7.6"
  },
  "devDependencies": {
    "@angular/cli": "1.0.0-rc.2",
    "@angular/compiler-cli": "^2.4.0",
    "@types/jasmine": "2.5.38",
    "@types/node": "~6.0.60",
    "codelyzer": "~2.0.0",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "protractor": "~5.1.0",
    "ts-node": "~2.0.0",
    "tslint": "~4.5.0",
    "typescript": "~2.0.0"
  }
}

這是報錯的畫面

操作台報錯畫面

过去多啦不再A梦过去多啦不再A梦2743 天前700

全部回覆(2)我來回復

  • ringa_lee

    ringa_lee2017-05-15 17:15:13

    雷雷

    回覆
    0
  • 漂亮男人

    漂亮男人2017-05-15 17:15:13

    自問自答

    npm i angular-in-memory-web-api

    缺少了這個就安裝這個,參考連結

    回覆
    0
  • 取消回覆