Sharing Top Content from the Angular-sphere.

Hosting Angular 2 Applications On Firebase – CodingTheSmartWay Blog – Medium

Hosting Angular 2 Applications On Firebase

☞ 

#angular2 #javascript

  • Hosting Angular 2 Applications On FirebaseThis post has been published first on CodingTheSmartWay.com.In this tutorial you’ll learn how to initiate a new Angular 2 application, get it up and running on your local system and finally deploy it to the free Firebase hosting plan and make it available in the WWW.Step…
  • First make sure Angular CLI is available on your system by using the following command for download and installation via NPM:  $ npm install angular-cli -g Once installed the ng command becomes available and we can initiate a new Angular 2 project by executing:  $ ng new fb-host-test A new folder is created with…
  • The content of that folder will be used in the final deployment step.Step 3: Creating A Firebase Project And Installing Firbase Command Line ToolNow that we have a running Angular 2 project which is prepared for beeing deployed on our local system we’re able to continue to prepare Firebase hosting.
  • The first thing we need to do is to open the Firebase console at and create a new Firebase project:To deploy our local Angular 2 application to the Firebase hosting service we need to install the Firebase command line tools first by using NPM again:  $ npm install -g firebase-tools After the…
  • In the next step we’ll make use of this command to complete the deployment.Step 4: Deploying To FirebaseWith the firebase command available the deployment process can be started next.

In this tutorial you’ll learn how to initiate a new Angular 2 application, get it up and running on your local system and finally deploy it to the free Firebase hosting plan and make it available in…

Hosting Angular 2 Applications On FirebaseThis post has been published first on CodingTheSmartWay.com.In this tutorial you’ll learn how to initiate a new Angular 2 application, get it up and running on your local system and finally deploy it to the free Firebase hosting plan and make it available in the WWW.Step 1: Use Angular CLI To Initiate A New ProjectAngular CLI is a command line interface scaffolding tool which makes it very easy to initiate and manage Angular 2 projects from the command line. First make sure Angular CLI is available on your system by using the following command for download and installation via NPM:  $ npm install angular-cli -g Once installed the ng command becomes available and we can initiate a new Angular 2 project by executing:  $ ng new fb-host-test A new folder is created with the name of the project (fb-host-test) and the initial project structure is created and all dependencies are downloaded. Having completed that step you can switch into the new project directory:  $ cd fb-host-test  and test if the application is already working by executing:  $ ng serve This is starting up the web server and making the application available at http://localhost:4200. The result which is displayed in the browser should look like the following:Step 2: Building For ProductionTo prepare deployment we need to build our application for production. This step can be completed by using the ng command in the following way:  $ ng build –prod This runs a project build which contains additional steps like bundling and minification which optimizes the result for production…

Hosting Angular 2 Applications On Firebase – CodingTheSmartWay Blog – Medium