O'Reilly logo

Pro AngularJS by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 13

image

Using Controllers and Scopes

In this chapter, I describe the relationship between controllers and scopes and demonstrate how to use both to best effect. Scopes are more complex than they first appear and—as you’ll learn—form a hierarchy that can be used to communicate between controllers. I’ll also show you how can create controllers that don’t use scopes and how you can use scopes to integrate AngularJS with other JavaScript frameworks. Table 13-1 summarizes this chapter.

Table 13-1. Chapter Summary

Problem

Solution

Listing

Create a controller.

Use the Module.controller method to define a controller and apply it to an HTML ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required