UNPKG

ohayolibs

Version:

Ohayo is a set of essential modules for ohayojp.

121 lines (88 loc) 5.39 kB
--- order: 10 title: Getting Started type: Basic --- ## Foreword ohayojp is a production-ready solution for admin interfaces. Built on the design principles developed by [Ant Design](https://ant.design/), this project introduces higher level components; we have developed templates, components, and a corresponding design kit to improve the user and development experience for admin interfaces. **How to read document** This document uses the following conventions: - API - `[]` Input Property - `()` Output Event - `[()]` Two-way binding - `ng-content` Component content placeholders - `#tpl` Refers `<ng-template #tpl></ng-template>` ## Preparation You will need [node](http://nodejs.org/) and [git](https://git-scm.com/). The project is based on [Typescript](https://www.tslang.com/), [Angular](https://angular.io/), [g2](http://g2.alipay.com/), [@ohayo](https://github.com/ohayojp/ohayo) and [ng-zorro-antd](https://ng.ant.design/). It would be helpful if you have pre-existing knowledge on those. ## Installation ### CLI (Recommend) Please make sure global Angular Cli is `9.x` version via `ng version` command, please refer to [CLI Command Reference](https://angular.io/cli) for how to upgrade. ```bash # Install the 9.x version of the global Angular Cli version # Via yarn yarn global add @angular/cli@9.x # Or via npm # npm install -g @angular/cli@9.x ``` ```bash ng new my-project --style less --routing cd my-project ng add ohayojp npm start ``` > Please refer to [Schematics](/cli) for more details. ### Clone the Git Repository ```bash git clone --depth=1 https://github.com/ohayojp/ohayojp.git my-project cd my-project yarn npm start ``` > Note: Installing with the CLI is a clean scaffolding; using clone the git repository include all example pages. ## Scaffolding ohayojp is a standard Angular CLI project that includes common routes for admins and demonstrates our component library. The project layout is as follows: ``` ├── _mock # Mock Data rule ├── src │   ├── app │   │   ├── core # Core module │   │   │   ├── i18n │   │   │   ├── net │   │   │   │   └── default.interceptor.ts # Default HTTP interceptor │   │   │   ├── services │   │   │   │   └── startup.service.ts # Initialize project configuration │   │   │   └── core.module.ts # Core module file │   │   ├── layout # Core layout │   │   ├── routes │   │   │   ├── ** # Business directory │   │   │   ├── routes.module.ts # Service routing module │   │   │   └── routes-routing.module.ts # Service routes registration │   │   ├── shared # Shared module │   │   │   ├── shared-ohayo.module.ts # @Ohayo/* import of secondary shared modules │   │   │   ├── shared-zorro.module.ts # NG-ZORRO import of secondary shared modules │   │   │   └── shared.module.ts # Shared module file │   │   ├── app.component.ts # Root component │   │   └── app.module.ts # Root module │   │   └── global-config.module.ts # @ohayo & ng-zorro global config │   ├── assets # Local static resource │   ├── environments # Environment variable configuration │   ├── styles # Style directory └── └── style.less # Style guide entry ``` ## Development ```bash npm start ``` This will automatically open [http://localhost:4200](http://localhost:4200). If you see the following page then you have succeeded. ![](./assets/screenshot/desktop.png | width=700) ## Contributing Please read our [CONTRIBUTING.md](/docs/contributing) first. If you'd like to help us improve NG-ZORRO, just create a [Pull Request](https://github.com/ohayojp/ohayojp/pulls). Feel free to report bugs and issues [here](https://github.com/ohayojp/ohayojp/issues). > If you're new to posting issues, we ask that you read [*How To Ask Questions The Smart Way*](http://www.catb.org/~esr/faqs/smart-questions.html)(This guide does not provide actual support services for this project!) and [How to Ask a Question in Open Source Community](https://github.com/seajs/seajs/issues/545) and [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html) prior to posting. Well written bug reports help us help you! ## Need Help? For questions on how to use ohayojp, please post questions to [![Stack Overflow](https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-logo.svg | width=140)](https://stackoverflow.com/questions/tagged/ohayojp) using the `ohayojp` tag. As always, we encourage experienced users to help those who are not familiar with `ohayojp`! ## DONATE If you would like to [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/cipchk) to ohayojp.