Giter Club home page Giter Club logo

angular-starter's Introduction

Angular starter

This angular starter allows to begin a new app using Angular 15.

This project was angular starter generated with Angular CLI version 15.2.0.

Getting started

Prerequisites

To run your project locally, you need the following installed:

Download project

  1. Run git clone [email protected]:SUtengda/angular-starter.git or git clone --branch=feat/clean [email protected]:SUtengda/angular-starter.git where I kept only necessary code to run application.
  2. Delete folder .git of project (cd angular-starter then rm -rf .git)
  3. Re run git init if necessary

or just download zip folder

Rename project name

Angular-cli doesn't do renaming, you should manually modify it.

  1. Open angular.json and package.json file
  2. Replace all occurrences of the old name which is angular-starter
  3. Rename project folder name
  4. If node_modulesfolder exist, delete it and reinstall the package

Install dependencies

Run npm i to install the required libraries. Then run ng serve

Unit tests

Run ng test to execute the example unit tests

Project architecture

angular-scss-start
β”œβ”€ πŸ“src
β”‚  β”œβ”€ πŸ“app
β”‚  β”‚  β”œβ”€ πŸ“cart
β”‚  β”‚  β”‚  β”œβ”€ πŸ“pipes
β”‚  β”‚  β”‚  β”‚  β”œβ”€ πŸ“„totalPriceWithTax.pipe.spec.ts
β”‚  β”‚  β”‚  β”‚  β”œβ”€ πŸ“„totalPriceWithTax.pipe.ts
β”‚  β”‚  β”‚  β”‚  β”œβ”€ πŸ“„totalTax.pipe.spec.ts
β”‚  β”‚  β”‚  β”‚  └─ πŸ“„totalTax.pipe.ts
β”‚  β”‚  β”‚  β”œβ”€ πŸ“„cart-routing.module.ts
β”‚  β”‚  β”‚  β”œβ”€ πŸ“„cart.component.html
β”‚  β”‚  β”‚  β”œβ”€ πŸ“„cart.component.scss
β”‚  β”‚  β”‚  β”œβ”€ πŸ“„cart.component.spec.ts
β”‚  β”‚  β”‚  β”œβ”€ πŸ“„cart.component.ts
β”‚  β”‚  β”‚  └─ πŸ“„cart.module.ts
β”‚  β”‚  β”œβ”€ πŸ“products  * This directory contains components
β”‚  β”‚  β”‚  β”œβ”€ πŸ“components
β”‚  β”‚  β”‚  β”‚  └─ πŸ“product
β”‚  β”‚  β”‚  β”‚     β”œβ”€ πŸ“„product.component.html
β”‚  β”‚  β”‚  β”‚     β”œβ”€ πŸ“„product.component.scss
β”‚  β”‚  β”‚  β”‚     β”œβ”€ πŸ“„product.component.spec.ts
β”‚  β”‚  β”‚  β”‚     └─ πŸ“„product.component.ts
β”‚  β”‚  β”‚  β”œβ”€ πŸ“models
β”‚  β”‚  β”‚  β”‚  └─ πŸ“„products.interfaces.ts
β”‚  β”‚  β”‚  β”œβ”€ πŸ“pipes
β”‚  β”‚  β”‚  β”‚  β”œβ”€ πŸ“„filter.pipe.spec.ts
β”‚  β”‚  β”‚  β”‚  β”œβ”€ πŸ“„filter.pipe.ts
β”‚  β”‚  β”‚  β”‚  β”œβ”€ πŸ“„totalProductCount.pipe.spec.ts
β”‚  β”‚  β”‚  β”‚  β”œβ”€ πŸ“„totalProductCount.pipe.ts
β”‚  β”‚  β”‚  β”‚  β”œβ”€ πŸ“„uniqueCategories.pipe.spec.ts
β”‚  β”‚  β”‚  β”‚  └─ πŸ“„uniqueCategories.pipe.ts
β”‚  β”‚  β”‚  β”œβ”€ πŸ“„products.component.html
β”‚  β”‚  β”‚  β”œβ”€ πŸ“„products.component.scss
β”‚  β”‚  β”‚  β”œβ”€ πŸ“„products.component.spec.ts
β”‚  β”‚  β”‚  β”œβ”€ πŸ“„products.component.ts
β”‚  β”‚  β”‚  └─ πŸ“„products.module.ts
β”‚  β”‚  β”œβ”€ πŸ“shared   * This directory contains services, guards, models, and any other shared code that is used throughout the application.
β”‚  β”‚  β”‚  β”œβ”€ πŸ“consts
β”‚  β”‚  β”‚  β”‚  └─ πŸ“„common.ts
β”‚  β”‚  β”‚  β”œβ”€ πŸ“models
β”‚  β”‚  β”‚  β”‚  └─ πŸ“„product.model.ts
β”‚  β”‚  β”‚  β”œβ”€ πŸ“page-not-found 
β”‚  β”‚  β”‚  β”‚  └─ πŸ“„page-not-found.component.ts
β”‚  β”‚  β”‚  β”œβ”€ πŸ“pipes
β”‚  β”‚  β”‚  β”‚  └─ πŸ“„priceWithTax.pipe.ts
β”‚  β”‚  β”‚  β”œβ”€ πŸ“services
β”‚  β”‚  β”‚  β”‚  β”œβ”€ πŸ“„cart.service.spec.ts
β”‚  β”‚  β”‚  β”‚  β”œβ”€ πŸ“„cart.service.ts
β”‚  β”‚  β”‚  β”‚  β”œβ”€ πŸ“„products.service.spec.ts
β”‚  β”‚  β”‚  β”‚  └─ πŸ“„products.service.ts
β”‚  β”‚  β”‚  β”œβ”€ πŸ“utils
β”‚  β”‚  β”‚  β”‚  β”œβ”€ πŸ“„calc-tax.spec.ts
β”‚  β”‚  β”‚  β”‚  └─ πŸ“„calc-tax.ts
β”‚  β”‚  β”‚  └─ πŸ“„shared.module.ts
β”‚  β”‚  β”œβ”€ πŸ“„app-routing.module.ts
β”‚  β”‚  β”œβ”€ πŸ“„app.component.html
β”‚  β”‚  β”œβ”€ πŸ“„app.component.scss
β”‚  β”‚  β”œβ”€ πŸ“„app.component.spec.ts
β”‚  β”‚  β”œβ”€ πŸ“„app.component.ts
β”‚  β”‚  └─ πŸ“„app.module.ts
β”‚  β”œβ”€ πŸ“assets
β”‚  β”‚  β”œβ”€ πŸ“styles
β”‚  β”‚  β”‚  β”œβ”€ πŸ“„_breakpoint.scss
β”‚  β”‚  β”‚  β”œβ”€ πŸ“„_colors.scss
β”‚  β”‚  β”‚  └─ πŸ“„_mixin.scss
β”‚  β”‚  β”œβ”€ πŸ“„.gitkeep
β”‚  β”‚  └─ πŸ“„products.json
β”‚  β”œβ”€ πŸ“environments 
β”‚  β”‚  β”œβ”€ πŸ“utils
β”‚  β”‚  β”‚  β”œβ”€ πŸ“„endpoints.ts  * register backend api route here
β”‚  β”‚  β”‚  └─ πŸ“„env.model.ts  * this file declare types of endpoint
β”‚  β”‚  β”œβ”€ πŸ“„environment.prod.ts
β”‚  β”‚  └─ πŸ“„environment.ts
β”‚  β”œβ”€ πŸ“„favicon.ico
β”‚  β”œβ”€ πŸ“„index.html
β”‚  β”œβ”€ πŸ“„main.ts
β”‚  └─ πŸ“„styles.scss
β”œβ”€ πŸ“„.editorconfig
β”œβ”€ πŸ“„.eslintrc.json
β”œβ”€ πŸ“„.gitignore
β”œβ”€ πŸ“„README.md
β”œβ”€ πŸ“„angular.json
β”œβ”€ πŸ“„package-lock.json
β”œβ”€ πŸ“„package.json
β”œβ”€ πŸ“„tsconfig.app.json
β”œβ”€ πŸ“„tsconfig.json
└─ πŸ“„tsconfig.spec.json

Some useful command

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Update angular minor version

npx npm-check-updates --upgrade --target "minor" --filter "/@angular.*/"

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory.

Run npm run build:prod to build the project on mode production

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

angular-starter's People

Contributors

sqlitsu avatar sutengda avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.