AngularJS in Action
brief contents
contents
foreword
preface
acknowledgments
about this book
Roadmap
Source code conventions and downloads
Software requirements
Resources
Author Online
about the authors
about the cover illustration
Part 1: Get acquainted with AngularJS
Chapter 1: Hello AngularJS
1.1 Advantages of using AngularJS
1.2 The AngularJS big picture
1.3 Build your first AngularJS application
1.3.1 The module
1.3.2 Views and controllers
1.3.3 Services
1.3.4 Directives
1.4 Summary
Chapter 2: Structuring your AngularJS application
2.1 Hello Angello
2.2 AngularJS application structure
2.3 Laying the Angello foundation
2.4 Basic routes and navigation
2.5 A few best practices
2.6 Summary
Part 2: Make something with AngularJS
Chapter 3: Views and controllers
3.1 The big picture
3.2 What is an AngularJS view?
3.3 What is an AngularJS controller?
3.3.1 The digest cycle
3.3.2 Controller as syntax
3.3.3 AngularJS events
3.4 Properties and expressions
3.4.1 Display stories with ngRepeat
3.4.2 Filters
3.4.3 Expressions
3.5 Best practices and testing
3.6 Summary
Chapter 4: Models and services
4.1 What are models and services?
4.1.1 Hello services
4.1.2 The service lifecycle
4.1.3 The different types of services
4.2 Models with $http
4.2.1 What is $http?
4.2.2 Create your first model
4.2.3 $http convenience methods
4.3 Promises
4.3.1 What are promises?
4.3.2 Promises in action
4.3.3 $http.success and $http.error
4.3.4 Elegant sequencing with promises
4.4 $http interceptors
4.4.1 Why intercept?
4.4.2 Interceptors in action
4.5 Service decorators
4.5.1 Why decorate?
4.5.2 Enhanced logging
4.6 Testing consideration
4.6.1 Testing a service
4.6.2 Using $httpBackend to mock server calls
4.6.3 Best practices
4.7 Summary
Chapter 5: Directives
5.1 Introduction to directives
5.1.1 What are directives?
5.1.2 Why we need directives
5.1.3 Why we want directives
5.2 Directives 101: a quick foundation
5.2.1 The user story directive
5.3 A more advanced feature
5.3.1 The drag-and-drop feature
5.3.2 Use the drag-container directive
5.3.3 Build the controller
5.3.4 Create the drop-container directive
5.3.5 Use the drop-container directive
5.3.6 Build the controller
5.3.7 Create the drop-target directive
5.3.8 Use the drop-target directive
5.3.9 Build the controller
5.3.10 Create the $dragging service
5.3.11 Update the StoryboardCtrl
5.4 Integrating with third-party libraries again!
5.4.1 Install Flot
5.4.2 Build the directive
5.4.3 Use the directive
5.4.4 Massage our data
5.4.5 It’s time we had the “isolated scope talk”
5.4.6 Grand finale: breathe life into Flot
5.5 Testing a directive
5.6 Best practices
5.7 Summary
Chapter 6: Animations
6.1 Intro to animations
6.1.1 How AngularJS handles animations
6.1.2 The animation-naming convention
6.1.3 Animations enable!
6.2 CSS transitions
6.2.1 Define the base transition
6.2.2 Define the ng-enter transitions
6.2.3 Define the ng-leave transitions
6.2.4 Making it move
6.3 CSS animations
6.3.1 Define the base animation classes
6.3.2 Define the animation keyframes
6.3.3 Make it move
6.4 JavaScript animations
6.4.1 Defining the JavaScript animation
6.4.2 The JavaScript animation events
6.4.3 The JavaScript animation class
6.4.4 TweenMax
6.4.5 Making it move
6.5 Testing
6.6 Best practices
6.7 Summary
Chapter 7: Structuring your site with routes
7.1 The components of AngularJS routes
7.2 How to create routes in AngularJS
7.2.1 Create your first route with ngRoute and ngView
7.2.2 Add ngView
7.2.3 Set up your route with $routeProvider
7.2.4 Set up route navigation
7.2.5 Review
7.3 Using parameters with routes
7.3.1 Review
7.4 Using resolve with routes
7.4.1 Review
7.5 Route events
7.5.1 Review
7.6 Testing
7.7 Best practices
7.8 Summary
Chapter 8: Forms and validations
8.1 The big picture: AngularJS form validation
8.1.1 Extending HTML form elements
8.1.2 Adding validations
8.1.3 Form validation and CSS
8.1.4 Form validation, $setPristine, and $setUntouched
8.2 Testing
8.3 Best practices
8.4 Summary
appendix A: Setting up Karma
Setting up Karma
Install Node.js and Node Package Manager (npm)
Install packages
Initialize Karma
Use Karma
appendix B: Setting up a Node.js server
Setting up a Node.js server
Install Node.js (with Node Package Manager, a.k.a. npm) and MongoDB
Initialize the repo
Update EndpointConfigService.js
A note about Auth0
appendix C: Setting up a Firebase server
Setting up a Firebase server
Set up an account with Firebase
Create your first app
Bootstrap your Firebase app to Angello
A note about Auth0
appendix D: Running the app
Running the app
Get the code
Start the server
View the app
index
Symbols
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W
X