在学校我需要写一个角度为2而不是4的应用程序,但是当我输入npm install时,我有这样的依赖:
"dependencies": {
"@angular/common": "~4.0.0",
"@angular/compiler": "~4.0.0",
"@angular/core": "~4.0.0",
"@angular/forms": "~4.0.0",
"@angular/http": "~4.0.0",
"@angular/material": "^2.0.0-beta.6",
"@angular/platform-browser": "~4.0.0",
"@angular/platform-browser-dynamic": "~4.0.0",
"@angular/router": "~4.0.0",
"angular-in-memory-web-api": "~0.3.0",
"core-js": "^2.4.1",
"primeng": "^4.0.3",
"rxjs": "5.0.1",
"systemjs": "0.19.40",
"zone.js": "^0.8.4"
}
就像我认为@angular / ...意味着角度的版本,现在我有4个。我要求我的教学以角4进行,但他说"我只想要角2和#34; :/。 我怎样才能将它降级为2?
答案 0 :(得分:3)
评论中所述的Chapter 7 of the Building Blocks tutorial
您可以手动编辑依赖项,如下所示:
Uncaught TypeError: $(...).flexselect is not a function
at HTMLDocument.<anonymous> ((index):557)
at c (jquery-1.9.1.min.js:3)
at Object.fireWith [as resolveWith] (jquery-1.9.1.min.js:3)
at Function.ready (jquery-1.9.1.min.js:3)
at HTMLDocument.H (jquery-1.9.1.min.js:3)
注意:由于这些是旧模块,您可能会遇到类似&#34;未满足的对等依赖关系&#34;但您可以轻松地将版本号更改为所需的版本号。