Angular 6:如何安装以前版本的 Angular 项目 [英] Angular 6: How to install a previous version of Angular project

查看:20
本文介绍了Angular 6:如何安装以前版本的 Angular 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用当前的 Angular-cli 版本 (Angular 6) 安装以前版本的 Angular 项目.

How I can install a previous version of Angular project with the current Angular-cli version (Angular 6).

我找到了一个命令但不推荐使用:

I found a command but is deprecated:

ng new my_project --ng4

推荐答案

既然要使用angular-cli新建项目,就需要安装scaffolds的@angular/cli版本角度 4 项目.

Since you want to use angular-cli to create new project, you need to install the version of @angular/cli that scaffolds angular 4 project.

支持 Angular 4 项目的 @angular/cli 版本是 1.4.9.

Version of @angular/cli which scaffolds the Angular 4 project is 1.4.9.

所以,使用npm,做npm install @angular/cli@1.4.9,然后使用angular-cli命令.

So, using npm, do npm install @angular/cli@1.4.9, then use angular-cli commands.

这篇关于Angular 6:如何安装以前版本的 Angular 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆