Giter VIP home page Giter VIP logo

angular-core-concepts's Introduction

Angular Core Concepts

This project shows several core features of Angular including:

  • Components
  • Data Binding
  • Communication between components
  • Services
  • Routing

Running the Project Locally

  1. Install the Angular CLI

    npm install -g @angular/cli

  2. Run npm install at the root of this project

  3. Run ng serve -o

Running the Project Using Docker Containers

  1. Install the Angular CLI

    npm install -g @angular/cli

  2. Run npm install at the root of this project

  3. Build the project

    ng build

  4. Ensure that you have volumes (file sharing) enabled in the Docker Desktop settings.

  5. Note that this build puts the build files directly in the dist folder. If your angular.json file in your own custom project puts them in a subfolder such as dist/your-project-folder then you'll need to update the docker-compose.yml file. In that case you'd change:

    volumes:
      - ./dist:/usr/share/nginx/html

    To:

    volumes:
      - ./dist/your-project-folder:/usr/share/nginx/html
  6. Run docker-compose build

  7. Run docker-compose up

  8. Visit http://localhost

Running the Production Version in Containers

  1. Run docker-compose -f docker-compose.prod.yml [build | up]. This uses a multi-stage Docker build process to create the nginx image for the Angular app.

    Note: This project build puts the Angular build files directly in the dist folder. If your angular.json file in your own custom project puts them in a subfolder such as dist/your-project-folder then you'll need to update nginx.prod.dockerfile with the appropriate path. You'd need to update this instruction:

    COPY --from=node /app/dist /usr/share/nginx/html

    To:

    COPY --from=node /app/dist/your-project-folder /usr/share/nginx/html

angular-core-concepts's People

Contributors

dependabot[bot] avatar danwahlin 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.