Luke Warren Dev
Software Development Tips and Stories When I feel Like It

Getting Started with Angular

Making the move to Angular (2 +) from AngularJS can seem quite daunting. This article will seek to demystify that process.

Getting Started with Angular

Names have changed

With the new version of Angular you might be tempted to refer to it as Angular 2 with the former as Angular 1. That would be a mistake. Angular is now on version 4 and that number is set to move fast now that Angular will be following Semver.

You should refer to Angular 1.x as AngularJS and Angular 2+ as Angular.

Languages have changed

You have probably heard about Angular's switch to Typescript as the preferred programming language. This, though, is nothing to be afraid of if you already have experience in JavaScript and a statically typed language such as C#.

Typecript is really just a superset of JavaScript, adding typing, object orientation and other useful things that you would find in the newer versions of JavaScript, like classes.

It will take a bit of getting used to but, once you have, you will love it.

Why should I care about the Angular, can't I just stick with AngularJS

Well, no, you can't.

Support for AngularJS is being dropped which is a big issue. On top of that, developers are going to be moving their efforts into building components for Angular. Meaning, your application is basically already outdated and will only have access to old directives and libraries.

Aside from that, Angular adds all sorts of performance enhancements and is just so much easier to organise and reason about through it's web component and module architecture.

How do I get started?

Firstly, go read the Tour of Heroes tutorial. Just do it, it covers all the basics and will take you a few hours.

Secondly, install the Angular-CLI.

Note - Your will need to have Node and NPM installed for this

This is done by opening a command window and simply running: npm install @angular/cli -g

The -g part installs the CLI globally and will make it available on your PATH.

Next, cd to a directory where you want to create an angular app and run: ng new your-app-name

Tadah! You now have an Angular app.

Want to see it?

Simply type npm start or ng serve and navigate to localhost:4200

Note - npm start really just runs ng serve. Take your pick


It really is super easy to get up and running with Angular. In future articles I will break down some of the basics but the Tour of Heroes tutorial does an excellent job should you not wish to wait.

Click here to comment