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了
初学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了