Getting Started with AngularJS by Christine Moore

Starting out with AngularJS

Tags: ,

AngularJS, is the Javascript MVC framework created by Google, allowing developers to build properly architectured and maintainable web applications. It is incredibly powerful and bridges the gap between HTML and JavaScript like never before.

Like most developers, I have been using jQuery on my projects for quite a long while now. It seems to be pretty engrained in the web development world, with many popular plugins and add-ons relying on it, it’s easy to see why people often turn to it. Despite there being a bit of a learning curve with Angular, I decided to start learning it a while ago and I’m really glad I did. 

Here are a couple of concepts within Angular that I have found particularly useful to use:

Directives

One of the most powerful things about Angular are directives, which extend HTML with custom attributes and elements. For example, ng-repeat is a directive which can be used to repeat a set of data onto the view. Another example of a useful directive is ng-click, which allows you to bind click events to elements in the HTML page. I have found this ability to ‘link’ the HMTL directly with the JavaScript code behind it really useful, improving the workflow and creating a more powerful application.

Scope

Scope is another concept in Angular that takes a bit of time to get your head around but proves incredibly useful when building web applications. Scope provides context and variables stored in a particular scope allow access to controllers, directives and expressions.

Useful Resources for Learning Angular

If you are planning to start learning AngularJS, these are some resources that I’ve found useful:

  • The AngularJS website is always going to be a good place to start, have a read of some of the basic information to help you understand what AngularJS is and why to use it. I found the Conceptual Overview particularly useful for a quick basic overview of the framework.
  • The free Code School course ‘Shaping up with AngularJS’ is a brilliant tutorial if you’ve got a bit of time to dedicate to learning. The tutorial includes a set a videos that will teach you a concept, after each one you will then write your own code with practical online tasks for each section. It’s a more enjoyable and engaging way of learning.
  • Tuts+ has a great tutorial called ‘Building a Web App From Scratch in AngularJS’, I won’t explain what that involves, as I think the title sums it up pretty well. What I liked about this was having the little app at the end of it to refer to when coding later projects.
  • Recipes with AngularJS is a great set of resources for things you’ll almost certainly need to build in Angular, from introductory articles, to more complex code.
  • If like me, you find it easier to learn by doing, this tutorial on ‘Creating a Single Page Todo App with Node and Angular’ will be right up your street. It’s also a great opportunity to have a go at NodeJS too.

I hope these resources are useful and that learning Angular is enjoyable. Good luck!