0
我已經使用'npm install @ types/bootstrap --save'安裝了Twitters bootstrap。我的package.json依賴關係是這樣的:如何在我的Angular 2應用程序中使用@types依賴項?
"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",
"@types/bootstrap": "^3.3.32",
"@types/d3": "^4.5.0",
"angular-in-memory-web-api": "~0.2.4",
"core-js": "^2.4.1",
"rxjs": "5.0.1",
"systemjs": "0.19.40",
"zone.js": "^0.7.4"
}
我試圖做一個導入到我的app.modules或app.components(不知道它屬於的地方),但我每次加import { Bootstrap } from '@types/bootstrap'
時候它說找不到localhost:3000/@ types/bootstrap。
請討論你可能會發現解決方案https://github.com/valor-software/ng2-bootstrap/issues/1035 – Sourabh