Specialized AngularJS Object Providers

The Module object provides special constructor methods to add providers for the AngularJS objects that you need to implement in your modules. These specialized methods enable you to add definitions for the following types of objects:

animation(name, animationFactory)

controller(name, controllerFactory)

filter(name, filterFactory)

directive(name, directiveFactory)

The reason these are specialized methods is that there are corresponding animation, controller, filter, and directive objects defined in AngularJS for these provider methods.

Each of these objects is covered in more detail in later chapters. For now, here’s a quick look at a basic controller definition:

var ...

Get Learning AngularJS 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.