CHAPTER 19

image

Services for Global Objects, Errors, and Expressions

In this chapter, I show you the built-in services that AngularJS provides for accessing global objects, dealing with exceptions, displaying dangerous data, and processing expressions. These are some of the most useful services that AngularJS provides, and using them directly gives you the ability to control some of the fundamental AngularJS features that I demonstrated in earlier chapters. Table 19-1 summarizes this chapter.

Table 19-1. Chapter Summary

Problem

Solution

Listing

Access global objects in a way that eases unit testing.

Use the $document, $interval, $log, $timeout ...

Get Pro 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.