Angular
Angular安装
- 安装AngularCli
npm install -g @angular/cli
ng v

2. 创建项目
ng new <project-name> | ng new <project-name> --skip-install
如果使用skip创建空白项目需要npm install后ng serve,如果因为网络原因安装失败使用npm cache clean --force清除缓存n
cd <project-name>
npm run start
以前的anguler启动命令是 ng serve | ng serve --open 新版本的ng启动要用npm run 想使用ng命令的话需要去官网下载范例将里面的e2e文件copy进项目或使用ng e2e创建测试文件后进行启动
也可以使用楼主的资源分享Angular-quickstart创建项目
下面是官方的git地址
# download the example or clone the repo from github
git clone https://github.com/ganatan/angular12-app.git
# download the example or clone the repo from gitlab
git clone https://gitlab.com/ganatan/angular12-app.git
# download the example or clone the repo from bitbucket
git clone https://bitbucket.org/ganatan/angular12-app.git
quickstart在官方git的frontend文件内部需要npm install 后使用
本文介绍了Angular的快速安装方法,包括Angular CLI的安装步骤,创建新项目的命令,以及注意事项,如使用npm cache clean --force解决网络问题。还推荐了从GitHub、GitLab或Bitbucket下载官方示例项目的方法。
1430

被折叠的 条评论
为什么被折叠?



