AngularJS: Up and Running
Enhanced Productivity with Structured Web Apps
Publisher: O'Reilly Media
Release Date: September 2014
Pages: 290
Read on O'Reilly Online Learning with a 10-day trial
Start your free trial now Buy on AmazonWhere’s the cart? Now you can get everything with O'Reilly Online Learning. To purchase books, visit Amazon or your favorite retailer. Questions? See our FAQ or contact customer service:
1-800-889-8969 / 707-827-7019
support@oreilly.com
If you want to get started with AngularJS, either as a side project, an additional tool, or for your main work, this practical guide teaches you how to use this meta-framework step-by-step, from the basics to advanced concepts. By the end of the book, you’ll understand how to develop a large, maintainable, and performant application with AngularJS.
Guided by two engineers who worked on AngularJS at Google, you’ll learn the components needed to build data-driven applications, using declarative programming and the Model–view–controller pattern. You’ll also learn how to conduct unit tests on each part of your application.
- Learn how to use controllers for moving data to and from views
- Understand when to use AngularJS services instead of controllers
- Communicate with the server to store, fetch, and update data asynchronously
- Know when to use AngularJS filters for converting data and values to different formats
- Implement single-page applications, using ngRoute to select views and navigation
- Dive into basic and advanced directives for creating reusable components
- Write an end-to-end test on a live version of your entire application
- Use best practices, guidelines, and tools throughout the development cycle
Table of Contents
-
Chapter 1 Introducing AngularJS
-
Introducing AngularJS
-
Starting Out with AngularJS
-
Conclusion
-
-
Chapter 2 Basic AngularJS Directives and Controllers
-
AngularJS Modules
-
Creating Our First Controller
-
Working with and Displaying Arrays
-
More Directives
-
Working with ng-repeat
-
Conclusion
-
-
Chapter 3 Unit Testing in AngularJS
-
Unit Testing: What and Why?
-
Introduction to Karma
-
Jasmine: Spec Style of Testing
-
Writing a Unit Test for Our Controller
-
Running the Unit Test
-
Conclusion
-
-
Chapter 4 Forms, Inputs, and Services
-
Working with ng-model
-
Working with Forms
-
Leverage Data-Binding and Models
-
Form Validation and States
-
Error Handling with Forms
-
ngModelOptions
-
Nested Forms with ng-form
-
Other Form Controls
-
Conclusion
-
-
Chapter 5 All About AngularJS Services
-
AngularJS Services
-
Creating Our Own AngularJS Service
-
Conclusion
-
-
Chapter 6 Server Communication Using $http
-
Fetching Data with $http Using GET
-
Advanced $http
-
ngResource
-
Conclusion
-
-
Chapter 7 Unit Testing Services and XHRs
-
Dependency Injection in Our Unit Tests
-
Testing Services
-
Unit Testing Server Calls
-
Conclusion
-
-
Chapter 8 Working with Filters
-
What Are AngularJS Filters?
-
Creating AngularJS Filters
-
Things to Remember About Filters
-
Conclusion
-
-
Chapter 9 Unit Testing Filters
-
The Filter Under Test
-
Testing the timeAgo Filter
-
Conclusion
-
-
Chapter 10 Routing Using ngRoute
-
Routing in a Single-Page Application
-
Using ngRoute
-
Routing Options
-
Additional Configuration
-
Alternatives: ui-router
-
Conclusion
-
-
Chapter 11 Directives
-
What Are Directives?
-
Alternatives to Custom Directives
-
Understanding the Basic Options
-
Conclusion
-
-
Chapter 12 Unit Testing Directives
-
Steps Involved in Testing a Directive
-
The Stock Widget Directive
-
Setting Up Our Directive Unit Test
-
Other Considerations
-
Conclusion
-
-
Chapter 13 Advanced Directives
-
Life Cycles in AngularJS
-
Transclusions
-
Directive Controllers and require
-
Compile
-
Priority and Terminal
-
Third-Party Integration
-
Best Practices
-
Conclusion
-
-
Chapter 14 End-to-End Testing
-
The Need for Protractor
-
Initial Setup
-
Protractor Configuration
-
An End-to-End Test
-
Considerations
-
Conclusion
-
-
Chapter 15 Guidelines and Best Practices
-
Testing
-
Project Structure
-
Build
-
Best Practices
-
Tools and Libraries
-
Conclusion
-