angular2前端对接接口方法
1、需要将谷歌浏览器设置跨域 https://www.cnblogs.com/cshi/p/5660039.html
2、在 \src\services\httpService.ts中创建接口路径: post 方法:
public UserRegister(params:any):Promise<any>{return this.http.post(this.urlBasePath+&q…
官网传送门
安装CLI及搭建项目
> npm install -g angular/cli
> ng new my-app 或 ng new my-app --stylescss
> cd my-app
> ng serve --open
网络慢可切换至cnpm
> ng set --global packageManagercnpmangular-cli修改端口号 例如:创建模块
…