OdooAppBox 项目使用教程
OdooAppBoxOdoo Mobile Application项目地址:https://gitcode.com/gh_mirrors/od/OdooAppBox
1. 项目的目录结构及介绍
OdooAppBox 项目的目录结构如下:
OdooAppBox/
├── README.md
├── app
│ ├── src
│ │ ├── app
│ │ │ ├── pages
│ │ │ │ ├── home
│ │ │ │ │ ├── home.html
│ │ │ │ │ ├── home.scss
│ │ │ │ │ └── home.ts
│ │ │ │ └── about
│ │ │ │ ├── about.html
│ │ │ │ ├── about.scss
│ │ │ │ └── about.ts
│ │ │ ├── app.component.html
│ │ │ ├── app.component.scss
│ │ │ ├── app.component.ts
│ │ │ ├── app.module.ts
│ │ │ ├── app.routing.ts
│ │ │ └── main.ts
│ │ ├── assets
│ │ │ ├── icon
│ │ │ └── images
│ │ ├── environments
│ │ │ ├── environment.prod.ts
│ │ │ └── environment.ts
│ │ ├── index.html
│ │ ├── manifest.json
│ │ └── service-worker.js
│ ├── angular.json
│ ├── package.json
│ ├── tsconfig.json
│ └── tslint.json
├── backend
│ ├── __init__.py
│ ├── models
│ │ ├── __init__.py
│ │ └── model.py
│ ├── controllers
│ │ ├── __init__.py
│ │ └── controller.py
│ ├── views
│ │ ├── __init__.py
│ │ └── view.xml
│ └── __manifest__.py
└── .gitignore
目录结构介绍
app/
: 包含前端应用的所有文件。src/
: 源代码目录。app/
: 应用的主要代码。pages/
: 包含各个页面的代码。app.component.*
: 应用的根组件。app.module.ts
: 应用的模块定义。app.routing.ts
: 路由配置。main.ts
: 应用的入口文件。
assets/
: 静态资源文件。environments/
: 环境配置文件。index.html
: 主页文件。manifest.json
: PWA 配置文件。service-worker.js
: 服务工作线程文件。
angular.json
: Angular 配置文件。package.json
: 项目依赖和脚本配置。tsconfig.json
: TypeScript 配置文件。tslint.json
: 代码风格检查配置。
backend/
: 包含后端模块的所有文件。__init__.py
: 模块初始化文件。models/
: 数据模型文件。controllers/
: 控制器文件。views/
: 视图文件。__manifest__.py
: 模块配置文件。
.gitignore
: Git 忽略文件配置。
2. 项目的启动文件介绍
前端启动文件
app/src/main.ts
: 这是前端应用的入口文件,负责启动 Angular 应用。
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
后端启动文件
backend/__init__.py
: 这是后端模块的初始化文件,负责加载模块。
from . import models
from . import controllers
3. 项目的配置文件介绍
前端配置文件
app/angular.json
: Angular 项目的配置文件,包含项目的构建和开发服务器配置。
{
"$schema": "./node_
OdooAppBoxOdoo Mobile Application项目地址:https://gitcode.com/gh_mirrors/od/OdooAppBox