|
|
||
|---|---|---|
| .. | ||
| config | ||
| favicons | ||
| public | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| Dockerfile | ||
| README.md | ||
| karma.conf.js | ||
| package.json | ||
| tsconfig.json | ||
| tslint.json | ||
| webpack.config.js | ||
README.md
Knoks
Technologies
- Angular 5
- Webpack 2
- TypeScript 2.x.x
- TSLint - rules descriptions
- Material Design
- Angular Flex-Layout
- SCSS for styles
- Angular2 material
Help video cast online example.
Installation
- Pre requirements: installed NodeJS 8.x.x with NPM
- On local repository the NPM command:
npm run setup - Install editorconfig for your editor.
Development Points
NPM task runners:
-
npm run start- Start dev server -
npm run test- run tests -
npm run build- default build production version. Result folder: dist/{brand name} Default values: BRAND_NAME="LDI" API_URL="http://localhost:52281/v1" API_IDENTIFIER="138659EBEBBF408AA1282D46EBDFBDC7"- to pass BRAND_NAME parameter in build command use next:
npm run build -- --env.brand_name=BRAND_NAME - to pass API_URL parameter in build command use next:
npm run build -- --env.api_url=URL - to pass API_IDENTIFIER parameter in build command use next:
npm run build -- --env.api_id=IDENTIFIER - for example
npm run build -- --env.brand_name=BRAND_NAME --env.api_url=URL --env.api_id=IDENTIFIER
- to pass BRAND_NAME parameter in build command use next:
Application entry points:
Entry point for application: src/app/app.module.ts
All declared components, global providers, global imports
Routing:
Setup: src/app/app.routing.ts
Components
Root components: app.component
Other components placed to src/app/components folder
Component Structure
- component class
- Naming:
{componentn name}.component.ts - should export class with decorator
@Component
- Naming:
- component template
- Naming:
{componentn name}.component.html
- Naming:
- component styles (optional)
- Naming:
{componentn name}.component.scss
- Naming:
Shared
In app/shared folder common parts for component, like models, services, resolvers, etc...
License
Copyright © Knoks. All Rights Reserved.