Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Expert Angular

You're reading from   Expert Angular Build deep understanding of Angular to set you apart from the developer crowd

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781785880230
Length 454 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Sridhar Rao Chivukula Sridhar Rao Chivukula
Author Profile Icon Sridhar Rao Chivukula
Sridhar Rao Chivukula
Mathieu Nayrolles Mathieu Nayrolles
Author Profile Icon Mathieu Nayrolles
Mathieu Nayrolles
Alexandru Vasile Pop Alexandru Vasile Pop
Author Profile Icon Alexandru Vasile Pop
Alexandru Vasile Pop
Rajesh Gunasundaram Rajesh Gunasundaram
Author Profile Icon Rajesh Gunasundaram
Rajesh Gunasundaram
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Architectural Overview and Building a Simple App in Angular 2. Migrating AngularJS App to Angular App FREE CHAPTER 3. Using Angular CLI to Generate Angular Apps with Best Practices 4. Working with Components 5. Implementing Angular Routing and Navigation 6. Creating Directives and Implementing Change Detection 7. Asynchronous Programming Using Observables 8. Template and Data Binding Syntax 9. Advanced Forms in Angular 10. Material Design in Angular 11. Implementing Angular Pipes 12. Implementing Angular Services 13. Applying Dependency Injection 14. Handling Angular Animation 15. Integrating Bootstrap with Angular Application 16. Testing Angular Apps Using Jasmine and Protractor Frameworks 17. Design Patterns in Angular

Promises

Promises are another useful asynchronous concept available in Angular. Conceptually, promises implement a totally different pattern. A Promise is a value that will be resolved or rejected in the future. Like the Observer pattern, they can be used to manage async programming. So, why bother to have two concepts to do the same thing? Well, the verbosity of Observer allows one thing that Promise does not: unsubscribe. The main difference that may lead to a decision about which one to use is the ability of Observable to catch many subsequent asynchronous events, while Promise can manage a single asynchronous event. To emphasise the differences between Observer and Promise, we will take the same example as before, fetching movies from a JSON API.

The AngularObservableAppComponent component will make an asynchronous call to the IMDBAPIService and, upon the answer, will update...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime