配置 Angular 10 运行环境
Angular Node.js About 1,269 words前置条件
Python2.7
Visual Studio Community 2017
- 设置
node-gyp
:npm config set msvs_version 2017
注意
Angular 11
可以使用Python3
和Visual Studio Community 2019
。
安装 Angular 10
查看版本号:
npm view @angular/cli versions
选择Angular 10.2.3
:
npm install -g @angular/cli@10.2.3
测试是否安装成功
ng v
输出
PS C:\Workspace\Angular> ng v
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 10.2.3
Node: 14.16.1
OS: win32 x64
Angular:
...
Ivy Workspace:
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1002.3 (cli-only)
@angular-devkit/core 10.2.3 (cli-only)
@angular-devkit/schematics 10.2.3 (cli-only)
@schematics/angular 10.2.3 (cli-only)
@schematics/update 0.1002.3 (cli-only)
卸载 Angular
npm uninstall -g @angular/cli
新建项目
ng new angular-tour-of-heroes
输出:
√ Packages installed successfully.
'git' is not recognized as an internal or external command,
operable program or batch file.
运行项目
ng serve --open
Views: 2,493 · Posted: 2021-06-20
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...