加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

安装Angular CLI,准备学习Angular2

发布时间:2020-12-17 08:26:52 所属栏目:安全 来源:网络整理
导读:The Angular CLI is a tool to initialize,develop,scaffold and maintain Angular applications 初学Angular2,想使用官方推荐的方法初始化工程,并启动服务,打包,测试等。 在外网安装方法(China): 1.安装nodejs,当前版本nodejs8.9.4 npm5.6.0 2.Install
The Angular CLI is a tool to initialize,develop,scaffold and maintain Angular applications 初学Angular2,想使用官方推荐的方法初始化工程,并启动服务,打包,测试等。 在外网安装方法(China): 1.安装nodejs,当前版本nodejs8.9.4 npm5.6.0 2.Install python 2.7.x 当前版本2.7.14 3.npm install -g cnpm --registry=https://registry.npm.taobao.org 4.cnpm install -g @angular/cli 创建工程: ng new my-app --skip-install cd my-app cnpm install 注意:建议使用cnpm下载依赖包,因为用NPM下载的话非常慢,而且在windows里还涉及到安装VCBuild.exe等问题 在Hw黄区安装方法: 使用npm代理和cpmn都搞不定...最后只能用yarn来搞定 1.安装nodejs,当前版本nodejs8.9.4 npm5.6.0 2.Install python 2.7.x 当前版本2.7.14 3.npm config rm proxy npm config rm http-proxy npm config rm https-proxy npm config set no-proxy .huawei.com npm config set registry http://rnd-mirrors-langfang.huawei.com/npm-registry/ 4.npm install -g yarn 5.npm config set registry https://registry.npm.taobao.org yarn config set proxy http://xxx.xxx.xxx.xxx:3128 yarn config set http-proxy http://xxx.xxx.xxx.xxx:3128 yarn global add @angular/cli 创建工程: ng new my-app --skip-install 依赖包的话在公司内实在是下不下来,建议在外网download后使用etrans传回公司吧 总算可以ng serve开始helloworld了

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读