Sibeesh Passion

Top Menu

  • Home
  • Search
  • About
  • Privacy Policy

Main Menu

  • Articles
    • Azure
    • .NET
    • IoT
    • JavaScript
    • Career Advice
    • Interview
    • Angular
    • Node JS
    • JQuery
    • Knockout JS
    • Jasmine Framework
    • SQL
    • MongoDB
    • MySQL
    • WordPress
  • Contributions
    • Medium
    • GitHub
    • Stack Overflow
    • Unsplash
    • ASP.NET Forum
    • C# Corner
    • Code Project
    • DZone
    • MSDN
  • Social Media
    • LinkedIn
    • Facebook
    • Instagram
    • Twitter
  • YouTube
    • Sibeesh Venu
    • Sibeesh Passion
  • Awards
  • Home
  • Search
  • About
  • Privacy Policy

logo

Sibeesh Passion

  • Articles
    • Azure
    • .NET
    • IoT
    • JavaScript
    • Career Advice
    • Interview
    • Angular
    • Node JS
    • JQuery
    • Knockout JS
    • Jasmine Framework
    • SQL
    • MongoDB
    • MySQL
    • WordPress
  • Contributions
    • Medium
    • GitHub
    • Stack Overflow
    • Unsplash
    • ASP.NET Forum
    • C# Corner
    • Code Project
    • DZone
    • MSDN
  • Social Media
    • LinkedIn
    • Facebook
    • Instagram
    • Twitter
  • YouTube
    • Sibeesh Venu
    • Sibeesh Passion
  • Awards
  • Linux Azure Function Isolated Dot Net 9 YAML Template Deployment

  • Build, Deploy, Configure CI &CD Your Static Website in 5 mins

  • Post Messages to Microsoft Teams Using Python

  • Get Azure Blob Storage Blob Metadata Using PowerShell

  • Deploy .net 6 App to Azure from Azure DevOps using Pipelines

Angular
Home›Angular›What Is New and How to Set Up our First Angular 5 Application

What Is New and How to Set Up our First Angular 5 Application

By SibeeshVenu
November 15, 2017
3289
10
Share:
Angular_5

[toc]

Introduction

We all know that the Angular version 5 is released a few weeks back, aren’t you eager to know what is there we have got in Angular 5. What makes our development easy there? Well, here in this post I am going to discuss few updates in Angular 5. By saying that,  I will not be discussing all the items which have been released with this version. Here, we will also be checking how to create our first Angular 5 application. So at the end of this article, you will have your own sample application with you. Cheers for that. I hope you will like this article.

Developing an Angular 5 App series

These are the previous posts in this series. Please go ahead and have a look.

  1. What Is New and How to Set Up our First Angular 5 Application
  2. Angular 5 Basic Demo Project Overview
  3. Generating Your First Components And Modules in Angular 5 App

Source Code

You can always clone or download the source code here

Background

As I mentioned earlier, this post is going to give you an introduction to the changes or updates in Angular 5. The application we are going to create is a basic Angular application with the help Angular CLI and NPM (Node Package Manager). So if you have not installed NodeJS on your machine, please go ahead and install it from here. Now let’s see the key updates in Angular 5.

What is new in Angular 5?

Though there are quite a few updates, I would say more concentration was given to the area of performance and efficiency. Below is the list of key area updates.

AOT compiler

AOT is Ahead of Time compiler, what it does is, as the name implies, it converts all of our TypeScript codes to native JavaScript code to make sure that it supports in all the browsers. The same was being done by Just In Compiler in the previous version, so what makes the difference? AOT converts the code before it runs in the browser, whereas JIT converts it at runtime.  Hence the page renders faster.

Optimizations

As I mentioned earlier, the development team was concentrating more on the performance aspects of Angular 5. Two of such improvements are,

  1. Boost speed
  2. Smaller Bundles

Package Updates

There are some updates in few packages, and some of them are,

  1. Now Angular CLI 1.5 has Angular 5
  2. RXJS version is been upgraded to 5.5
  3. TypeScript is been updated to 2.4

New HttpClient

There are some changes in some modules as well, the new HttpClient module is faster and lighter than the previous version. Hence the old Http module is deprecated, however, you can still use the same in your applications, it is just that, the same will vanish in any future updates. The new module can be imported as below.

Import {HttpClientModule} from ‘@angular/common/http’

Other Updates

There are some other updates related to many modules and categories. Few of them are,

  1. Some changes in form validation, specifically in blur and on submit
  2. The pipes are more standardized and internationalized now
  3. Old pipes are deprecated now
  4. A new module ServerTransferStateModule is introduced

Sorry that I am not including any code snippets to highlight the actual changes, I will be writing an article very soon with full code changes.

Creating your first Angular 5 application

To create an Angular application easily, the first thing you may need to do is, Installing Angular CLI. I hope you had already done it. Let’s just jump into the process now.

Open your Node Package Manager Console and create a directory where we are going to download all the Angular files.

mkdir Angular5

Now we can move our cursor to that folder.

cd Angular5

Now we can check whether the Node and NPM is already installed or not.

D:\SVenu\FullStackDevelopment\Angular\Angular5>node -v

If it is installed you will get the version, for me it was v7.9.0

D:\SVenu\FullStackDevelopment\Angular\Angular5>npm -v

My NPM version is 4.2.0

By any chance, if you need to update your NPM version, you can always do that with the help of the preceding command.

D:\SVenu\FullStackDevelopment\Angular\Angular5>npm i -g npm

Once after I update my NPM version, the command npm -v was showing as 5.5.1. So now we are good to go. Our next step is to install Angular CLI, let’s do it.

D:\SVenu\FullStackDevelopment\Angular\Angular5>npm install @angular/cli -g

If you want to check the version of your Angular CLI, you can use the below command.

D:\SVenu\FullStackDevelopment\Angular\Angular5>ng -v

The result may look like below.

Angular CLI: 1.5.0
Node: 7.9.0
OS: win32 ia32
Angular:
…

Now it is time to create our Angular Project, please use the preceding command for the same.

D:\SVenu\FullStackDevelopment\Angular\Angular5>ng new MyAngular5App

Here MyAngular5App is the project name. Once you run the command, it will do 3 tasks.

  1. Creating the components which are needed
  2. Installing packages for tooling via npm.
  3. Initializing git

Now if you go to your project directory, you can see all the files has been included there already. You can go ahead and open the files in any source code editors.

As the last step, we need to run our application.

D:\SVenu\FullStackDevelopment\Angular\Angular5>cd MyAngular5App

D:\SVenu\FullStackDevelopment\Angular\Angular5\MyAngular5App>ng serve

The above command will build your application and serve the port 4200 by default. You may see the preceding output in the command window.

** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2017-11-15T07:45:17.925Z
Hash: dd334581365d3dd74dfd
Time: 21845ms
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 24.3 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 554 kB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 34.9 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 8.03 MB [initial] [rendered]

webpack: Compiled successfully.

Let’s run our application by running  http://localhost:4200 now. I am sure you will get an Angular application as preceding.

Angular_5

Angular_5

Conclusion

Thanks a lot for reading. Did I miss anything that you may think which is needed? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.

Your turn. What do you think?

A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.

Kindest Regards
Sibeesh Venu

TagsAngularAngular 5Angular 5 Basic AppFirst Angular 5 App
Previous Article

Recover your lost data in any Windows ...

Next Article

Angular 5 Basic Demo Project Overview

0
Shares
  • 0
  • +
  • 0
  • 0
  • 0

SibeeshVenu

I am Sibeesh Venu, an engineer by profession and writer by passion. Microsoft MVP, Author, Speaker, Content Creator, Youtuber, Programmer.

Related articles More from author

  • Nav_Demo
    Angular

    Generating Your First Components And Modules in Angular 5 App

    November 16, 2017
    By SibeeshVenu
  • Azure

    Deploy Angular App Using Azure DevOps Build and Release Pipelines

    January 7, 2019
    By SibeeshVenu
  • Angular

    Implementing Guard in Angular 5 App

    March 26, 2018
    By SibeeshVenu
  • ngDragDrop After Adding
    Angular

    New Angular Drag and Drop Feature – ngDragDrop

    October 30, 2018
    By SibeeshVenu
  • Angular_App_Folder_Structure
    Angular

    Angular 5 Basic Demo Project Overview

    November 15, 2017
    By SibeeshVenu
  • Angular Virtual Scrolling Demo Middle
    Angular

    Angular Virtual Scrolling – ngVirtualScrolling

    October 24, 2018
    By SibeeshVenu
0

My book

Asp Net Core and Azure with Raspberry Pi Sibeesh Venu

YouTube

MICROSOFT MVP (2016-2022)

profile for Sibeesh Venu - Microsoft MVP

Recent Posts

  • Linux Azure Function Isolated Dot Net 9 YAML Template Deployment
  • Build, Deploy, Configure CI &CD Your Static Website in 5 mins
  • Easily move data from one COSMOS DB to another
  • .NET 8 New and Efficient Way to Check IP is in Given IP Range
  • Async Client IP safelist for Dot NET
  • Post Messages to Microsoft Teams Using Python
  • Get Azure Blob Storage Blob Metadata Using PowerShell
  • Deploy .net 6 App to Azure from Azure DevOps using Pipelines
  • Integrate Azure App Insights in 1 Minute to .Net6 Application
  • Azure DevOps Service Connection with Multiple Azure Resource Group

Tags

Achievements (35) Angular (14) Angular 5 (7) Angular JS (15) article (10) Article Of The Day (13) Asp.Net (14) Azure (65) Azure DevOps (10) Azure Function (10) Azure IoT (7) C# (17) c-sharp corner (13) Career Advice (11) chart (11) CSharp (7) CSS (7) CSS3 (6) HighChart (10) How To (9) HTML5 (10) HTML5 Chart (11) Interview (6) IoT (11) Javascript (10) JQuery (82) jquery functions (9) JQWidgets (15) JQX Grid (17) Json (7) Microsoft (8) MVC (20) MVP (9) MXChip (7) News (18) Office 365 (7) Products (10) SQL (20) SQL Server (15) Visual Studio (10) Visual Studio 2017 (7) VS2017 (7) Web API (12) Windows 10 (7) Wordpress (9)
  • .NET
  • Achievements
  • ADO.NET
  • Android
  • Angular
  • Arduino
  • Article Of The Day
  • ASP.NET
  • Asp.Net Core
  • Automobile
  • Awards
  • Azure
  • Azure CDN
  • azure devops
  • Blockchain
  • Blog
  • Browser
  • C-Sharp Corner
  • C#
  • Career Advice
  • Code Snippets
  • CodeProject
  • Cognitive Services
  • Cosmos DB
  • CSS
  • CSS3
  • Data Factory
  • Database
  • Docker
  • Drawings
  • Drill Down Chart
  • English
  • Excel Programming
  • Exporting
  • Facebook
  • Fun
  • Gadgets
  • GitHub
  • GoPro
  • High Map
  • HighChart
  • How to
  • HTML
  • HTML5
  • Ignite UI
  • IIS
  • Interview
  • IoT
  • JavaScript
  • JQuery
  • jQuery UI
  • JQWidgets
  • JQX Grid
  • Json
  • Knockout JS
  • Linux
  • Machine Learning
  • Malayalam
  • Malayalam Poems
  • MDX Query
  • Microsoft
  • Microsoft ADOMD
  • Microsoft MVP
  • Microsoft Office
  • Microsoft Technologies
  • Microsoft Windows
  • Microsoft Windows Server
  • Mobile
  • MongoDB
  • Monthly Winners
  • MVC
  • MVC Grid
  • MySQL
  • News
  • Node JS
  • npm
  • Number Conversions
  • October 2015
  • Office 365
  • Office Development
  • One Plus
  • Outlook
  • Page
  • PHP
  • Poems
  • PowerShell
  • Products
  • Q&A
  • Raspberry PI
  • React
  • SEO
  • SharePoint
  • Skype
  • Social Media
  • Software
  • Spire.Doc
  • Spire.PDF
  • Spire.XLS
  • SQL
  • SQL Server
  • SSAS
  • SSMS
  • Storage In HTML5
  • Stories
  • Third Party Software Apps
  • Tips
  • Tools
  • Translator Text
  • Uncategorized
  • Unit Testing
  • UWP
  • VB.Net
  • Videos
  • Virtual Machine
  • Visual Studio
  • Visual Studio 2017
  • Wamp Server
  • Web API
  • Web Platform Installer
  • Webinars
  • WebMatrix
  • Windows 10
  • Windows 7
  • Windows 8.1
  • Wordpress
  • Writing

ABOUT ME

I am Sibeesh Venu, an engineer by profession and writer by passion. Microsoft MVP, Author, Speaker, Content Creator, Youtuber, Programmer. If you would like to know more about me, you can read my story here.

Contact Me

  • info@sibeeshpassion.com

Pages

  • About
  • Search
  • Privacy Policy
  • About
  • Search
  • Privacy Policy
© Copyright Sibeesh Passion 2014-2025. All Rights Reserved.
Go to mobile version