AngularJS – Modules and Controllers

AngularJS Modules

Modules are the AngularJS way of packaging similar functional codes under a single name. In simple terms it is like package of Java. AngularJS Modules consist of two main parts.

  • An AngularJS module can define its own Controllers, Services, factories and directives.These can be access through out the module.
  • Second part is it can have its own dependencies, when dependencies are defined then AngularJS will go find the module with particular name and make sure their controllers,services,factories and directives are available to this module.

[Read more…]

AngularJS Hello World Example

In this first article on AngularJS , let’s build the traditional “hello world” application. For this simple AngularJS Hello World application, we will have an input field which allows users to type their name. Then we will take the user name and display user’s name along with the welcome message.

For building up an AngularJS application we need to include “angular.js” file  and it can  be included in 2 different ways.

  • Go to site –> click on Download –> Copy the CDN URL  and use it in the application.
  • Download that angular.js file into your local folder and you can include it.

[Read more…]