Synopses & Reviews
- Dive deep into Angulars building blocks and learn how they work together
- Gain maximum flexibility by separating logic, data, and presentation responsibilities with MVC
- Assemble your full app in the browser, using client-side templates
- Use AngularJS directives to extend HTML with declarative syntax
- Communicate with the server and implement simple caching with the $http service
- Use dependency injection to improve refactoring, testability, and multiple environment design
- Get code samples for common problems you face in most web apps
Written by two engineers who worked on the AngularJS project at Google, this book shows you how a few conventions can result in dramatically smaller and more expressively and readable code. Youll learn how easy it is to adopt the "Zen of AngularJS."
With AngularJS, youll learn how to:
- Separate responsibilities with MVC for maximum flexibility
- Use declarative programming for the user interface, and imperative programming for business logic
- Eliminate the marshalling boilerplate in data binding to make MVC effortless
- Extend HTML syntax
- Use dependency injection for refactoring, testability, and designing apps for multiple environments
- Gain structural support for switching views and deep linking
About the Author
Brad Green works at Google as an engineering manager. In addition to the AngularJS project, Brad also directs Accessibility, and Support Engineering. Prior to Google, Brad worked on the early mobile web at AvantGo, founded and sold startups, and spent a few hard years toiling as a caterer. Brad's first job out of school was as lackey to Steve Jobs at NeXT Computer writing demo software and designing his slide presentations. Brad lives in Mountain View, CA with his wife and two children.
Shyam Seshadri is the owner / CEO of Fundoo Solutions (http://www.befundoo.com), where he splits his time between working on innovative and exciting new products for the Indian markets, and consulting about and running workshops on AngularJS. Prior to Fundoo Solutions, Shyam completed his MBA from the prestigious Indian School of Business in Hyderabad. Shyam's first job out of college was with Google, where he worked on multiple projects, including Google Feedback (AngularJS's first customer!), and various internal tools and projects. Shyam currently operates from his office in Navi Mumbai, India.
Table of Contents
Preface; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgments; Chapter 1: Introduction to AngularJS; 1.1 Concepts; 1.2 An Example: Shopping Cart; 1.3 Up Next; Chapter 2: Anatomy of an AngularJS Application; 2.1 Invoking Angular; 2.2 Model View Controller; 2.3 Templates and Data Binding; 2.4 Organizing Dependencies with Modules; 2.5 Formatting Data with Filters; 2.6 Changing Views with Routes and $location; 2.7 Talking to Servers; 2.8 Changing the DOM with Directives; 2.9 Validating User Input; 2.10 Moving On; Chapter 3: Developing in AngularJS; 3.1 Project Organization; 3.2 Tools; 3.3 Running Your Application; 3.4 Testing with AngularJS; 3.5 Unit Tests; 3.6 End-to-End/Integration Tests; 3.7 Compilation; 3.8 Other Awesome Tools; 3.9 Yeoman: Optimizing Your Workflow; 3.10 Integrating AngularJS with RequireJS; Chapter 4: Analyzing an AngularJS App; 4.1 The Application; 4.2 Relationship Between Model, Controller, and Template; 4.3 The Model; 4.4 Controllers, Directives, and Services, Oh My!; 4.5 The Templates; 4.6 The Tests; Chapter 5: Communicating with Servers; 5.1 Communicating Over $http; 5.2 Unit Testing; 5.3 Working with RESTful Resources; 5.4 The $q and the Promise; 5.5 Response Interception; 5.6 Security Considerations; Chapter 6: Directives; 6.1 Directives and HTML Validation; 6.2 API Overview; 6.3 Moving On; Chapter 7: Other Concerns; 7.1 $location; 7.2 AngularJS Module Methods; 7.3 Communicating Between Scopes with $on, $emit, and $broadcast; 7.4 Cookies; 7.5 Internationalization and Localization; 7.6 Sanitizing HTML and the Sanitize Module; Chapter 8: Cheatsheet and Recipes; 8.1 Wrapping a jQuery Datepicker; 8.2 The Teams List App: Filtering and Controller Communication; 8.3 File Upload in AngularJS; 8.4 Using Socket.IO; 8.5 A Simple Pagination Service; 8.6 Working with Servers and Login; 8.7 Conclusion; Index; Colophon;