Angular Tutorial – Part 2: Understanding Modules and Controllers

In this article we will try to understand and implement modules and controller in Angular.js. We will start with angular module and see why and how it is useful. We will then define a simple angular module for a test application. Next we will look at the concept of controllers in angular and try to implement a simple controller to understand the concepts. We will also look at the JavaScript design pattern called IIFE (Immediately Invoked Function Expression) as it is a very useful pattern to avoid globals when creating angular applications. Continue reading