Modules in AngularJS

In AngularJS, modules are structured to build highly scalable web applications. We can create them and use them throughout the application.

It is very simple to create and inject it in the application. From the AngularJS documentation, they define modules as:

Tip

Modules are a container for the different parts of your app such as controllers, services, filters, directives, and so on.

More details about modules, can be found at https://docs.angularjs.org/api/ng/type/angular.Module.

Modules can contain a collection of other components/dependencies such as controllers, services, directives, and others.

The basic simple form to create a module is as follows:

angular.module(ModuleName, [requires dependency]);

The basic simple form to use ...

Get Learning Single-page Web Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.