https://firebase.google.com/

In this section, we will see how to deploy angular application including angular library to firebase hosting using firebase cli tools.

Firebase account creation

To deploy your angular application to firebase hosting, you need to have an account on the firebase website https://console.firebase.google.com. Firebase expects Google account for login. If not create the Google account and login.

Create a project

Once done with the firebase account creation, now create Firebase project by clicking on the Create a project or Add Project button.


In this section, we will see how to create and use the custom directive by using angular library then use it in the angular application.

The command ng generate directive <custom-directive-name> --project=<project-name> is used to generate directive.

ng generate directive highLightColor--project=my-lib

Custom directive creation


In this section, we will see how to create and use the custom pipe by using angular library then use it in the angular application.

The command ng generate pipe <custom-pipe-name> --project=<project-name> is used to generate pipe.

ng generate pipe ellipsis --project=my-lib

Custom pipe creation


Step 1: Install angular cli

Install the CLI using the npm package manager.

npm install -g @angular/cli

Step 2: Create the workspace

Use the Angular CLI to generate a new workspace with the following commands.

ng new my-workspace --create-application=false --interactive=false

--create-application=false parameter avoids the creation of an initial application (default value is true). Otherwise, the Angular CLI creates an application in the src folder of the new workspace. It’s cleaner to generate all applications in the sub-folder projects of the workspace.

--interactive=false parameter is just here to avoid being prompted for useless parameter values such as whether the initial app…

Senior Software Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store