Sharing Top Content from the Angular-sphere.

Deploying an Angular CLI App to Production with Firebase ― Scotch

  • TLDR: What’s the Overall Process – – The Angular CLI will create our dist files: ng build –prod – We’ll deploy using Firebase command line tools: firebase deploy – Firebase will host and handle routing!
  • Here’s the steps we’re about to take: – – Download the tools – Login to Firebase using the tools – Link our local app to our Firebase app – – Install the Firebase Tools – We’ll use npm to install similar to how we installed the Angular CLI: – npm…
  • Using Firebase In Our Angular App – The first step is to link our local Angular app to our Firebase app we created in the Firebase dashboard.
  • Build Our Angular App – We’ll create our production files using the Angular CLI command: – ng build –prod – This will create a brand new dist/ folder in our project with the files necessary to launch our app.
  • Conclusion – With Firebase hosting, it’s an easy process to deploy our Angular CLI apps to production.

Building Angular apps is a fun project. Once you’re done building, it’s time to expand the fun by sharing your project with the world.

Building Angular apps is a fun project. Once you’re done building, it’s time to expand the fun by sharing your project with the world.

While there’s many ways to host our Angular application, we’ll be looking at how to host with Firebase since Firebase makes it super simple. Firebase offers many great features (and has a solid free plan).

Realtime Functions

Cloud Storage

Bunch More

We’ll just be using Firebase hosting to handle our Angular app.

TLDR: What’s the Overall Process

The Angular CLI will create our dist files: ng build –prod

We’ll deploy using Firebase command line tools: firebase deploy

Firebase will host and handle routing!

Creating an Angular App

We’ll be using the Angular CLI to create our Angular app that we’ll deploy. For more info on the CLI, check out our article: Use the Angular CLI For Faster Angular v2+ Projects.

Install the CLI

If you don’t already have the CLI installed, we can do it using Node and npm.

npm install -g @angular/cli

Note: The -g flag is to install globally across our entire machine.

Start an Angular App

Once we have the CLI, we can create a new Angular app…

Deploying an Angular CLI App to Production with Firebase ― Scotch