Angular开发中遇到的小问题(持续更新)
程序员文章站
2022-07-03 14:50:27
...
1、下载项目:
git clone 项目链接(http);
cd 进入项目;
git checkout dev 切换到dev分支;
yarn install 安装依赖包;
yarn start 启动项目
2、合并代码
eg: 切换到cdn_chj,拉取代码;
切换到cdn_txz;
git merge cdn-chj;
git push
3、接口地址
application.json和environment.ts里写接口地址;
service.ts里写
import { Environment } from '../../environments/environment';
export class Service {
private url = `${Environment.application.serviceAPI}`;
// get遍历拼接对象
traverse(obj) {
let traverse = '?';
for (var i in obj) {
if (obj[i]) {
traverse = traverse + i + '=' + obj[i] + '&';
}
}
return (traverse = traverse.substring(0, traverse.length - 1));
}
}
return this.http.post<any>(`${this.url}/user/service/list`,data);
4、
<img src="./../../../assets/images/introduce.png">
下一篇: c++指针小结