Preparing the Example Project
Setting the Boundaries of an AngularJS Application
Defining Controllers
Defining Filters
Using Modules to Organize Code
Why and When to Use Directives
Using the Data Binding Directives
Creating Two-Way Data Bindings
Generating Elements Repeatedly
Working with Partial Views
Conditionally Swapping Elements
Preparing the Example Project
Showing, Hiding, and Removing Elements
Handling Events
Managing Special Attributes
Managing Other Attributes
Preparing the Example Project
Implicitly Creating Model Properties
Validating Forms
Providing Form Validation Feedback
Using the Special Variables to Provide Feedback
Using the Form Directive Attributes
Using Text Areas
Why and When to Use Controllers and Scopes
Understanding the Basics
Setting Up the Scope
Organizing Controllers
Reusing a Controller
Reusing a Controller
Using Scope-less Controllers
Setting Up jQuery UI
Counting the Button Clicks
Why and When to Use Filters
Downloading the Localization File
Formatting Currency Values
Formatting Other Numeric Values
Changing String Case
Localizing Filter Output
Limiting the Number of Items
Sorting Items
Creating Custom Filters
Creating a Collection Filter
Why and When to Create Custom Directives
Creating a Custom Directive
Implementing the Link Function
Handling Data Changes
Navigating the Document Object Models
Creating and Removing Elements
Other jqLite Methods
Replacing jqLite with jQuery
Preparing the Example Project
Defining How the Directive Can Be Applied
Using a Function as a Template
Selecting an External Template with a Function
Managing Directive Scopes
Giving Each Directive Instance Its Own Scope
Preparing the Example Project
Using Compile Functions
Adding another Directive
Handling External Changes
Formatting Data Values
Why and When to Use and Create Services and Modules
Maintaining a Single Module
Creating and Using a Service
Using the Service Method
Using the Built-in Modules and Services
Preparing the Example Project
Why and When to Use the Global Object Services
Accessing the Document Object
Accessing the URL
Dealing with Exceptions
Working with Exceptions
Implementing a Custom Exception Handler
Why and When to Use the Dangerous Data Services
Using an Unsafe Binding
Working with AngularJS Expressions and Directives
Converting Expressions into Functions
Compiling Content
Why and When to Use the Ajax Services
Making Ajax Requests
Other General RDD Operations
Receiving Ajax Responses
Setting Ajax Defaults
Working with Promises
Consuming the Promise
Chaining Outcomes Together
Why and When to Use the REST Services
Creating the RESTful Service
Creating the AngularJS Application
Listing the Product Data
Creating Products
Testing the Ajax Implementation
Installing the ngResource Module
Configuring the $resource Service Actions
Why and When to Use the View Services
Understanding the Problem
Using URL Routing
Defining the URL Routes
Wiring Up the Code and Markup
Accessing Routes and Routes Parameters
Using Controllers with Routes
AngularUI Router
Preparing the Example Project
Why and When to Use the Animation Service
Defining and Applying an Animation
Supporting Touch Events
Why and When to Use Touch Events
Handling Swipe Gestures
Why and When to Use the Provision and Injection Services
Registering AngularJS Components
Determining Function Dependencies
Obtaining Service Instances
Getting the $injector Service from the Root Element
Angular-translate
Teaching Your App a New Language
Switching the Language at Run Time
Angular-gettext
Usage
Translating Our Strings
Changing Languages
What Is a Cache?
Caching through $http
Security
Whitelisting URLs
$sce API
Trusted Context Types
Ajax Caching
Getting Angular Apps Indexed
Options for Handling SEO from the Server Side
Using Zombie js to Grab HTML Snapshots
Prerender io
Understanding Chrome Apps
Building the Skeleton
tab html
The Main Module
Sign Up for Wunderground’s Weather API
Implementing a User Service
Sprinkling in Time Zone Support
What to Optimize
Optimizing the $digest Call
Optimizing Filters
Debugging AngularJS
Debugger
Working with Yeoman, Grunt & Bower in Angular
Organizing your Code
Writing Directives and Views
Communicating Between Components
Communicating with The Server
Unit Testing