Skip to content
angular6全框架后台管理模版
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode 框架搭建 May 5, 2019
e2e 框架搭建 May 5, 2019
src 新增环境信息 May 9, 2019
.editorconfig 基础框架模版 Apr 23, 2019
.gitignore 基础框架模版 Apr 23, 2019
README.md 开启跨域代理 May 9, 2019
angular.json
package-lock.json 首页 May 7, 2019
package.json 引入jsonp模块 May 9, 2019
proxy.config.json
tsconfig.json 基础框架模版 Apr 23, 2019
tslint.json 基础框架模版 Apr 23, 2019

README.md

鹿途智慧牧场(牛羊定位系统)

Live

blockchain blockchain blockchain

项目说明

项目继承鹿途管理系统框架结构,是一个完整的后台管理模版。

项目资源

地图:maps

图表:echarts

用户认证:@delon/auth

项目框架:ng-zorro

跨域代理

1、根目录下新增proxy.config.json

{
  "/apidata": {
    "target": "service address",
    "secure": false,
    "logLevel": "debug",
    "changeOrigin": true,
    "pathRewrite": {
      "^/apidata": ""
    }

  }
}

2、angular.json配置文件加载配置代理文件proxyconfig.json

"serve": {
  "builder": "@angular-devkit/build-angular:dev-server",
  "options": {
    "browserTarget": "project1:build",
      "proxyConfig": "proxy.config.json"
  },

3、component使用

login(params: { userCode: any; password: any; }): Observable<any> {
    return this.http.post('apidata/account/login', params);
  }

4、重启运行

ng serve --proxy-config proxy.config.json

提示

项目打包后刷新路由丢失,在app.module.ts中新增如下

providers:[
{ provide: LocationStrategy, useClass: HashLocationStrategy }
]

非重要说明

如果满意这个模版,请给我个小星星😊

You can’t perform that action at this time.