Angular 2 introduces an entirely new paradigm for applications, wholly embracing all the newest concepts that are built into the next generation of browsers and cutting away all the fat and bloat from Angular 1. This course plunges directly into the heart of all the most important Angular 2 concepts. Alongside the Angular 2 content, the course covers the new ES6 syntax, Typescript conventions, Web Components, and RxJS observables, among many other brand-new concepts. The second volume of this course will cover the ES6 implementation of Promises and will show you how to integrate them with Angular 2 applications. Once you’ve built a good foundation for the new concepts of Angular 2 from the previous volume, you’ll work with implementing RxJS observables and you’ll understand how to use them effectively. Finally, you’ll learn how to inject dependencies and wrap HTTP APIs with a service. These topics will help you gradually level up your knowledge and move on to the next volume of this course.
About the Author
Matt Frisbie is currently a software engineer at Google. He was the author of the Packt Publishing bestseller AngularJS Web Application Development Cookbook and also has published several video series through O'Reilly. He is active in the Angular community, giving presentations at meetups and doing webcasts.
Promises are very useful in many of the core aspects of Angular.
Much of the purpose of promises is to allow the developer to serialize and reason about independent asynchronous actions.
It is useful to have the ability to create promise objects that have already reached a final state with a defined value.
You may find your application requires the use of promises in an all-or-nothing type of situation.
A static method accepts an iterable collection of promise objects; whichever resolves or rejects first will become the result of the promise wrapping the collection.
Observables and promises serve different purposes and are good at different things, but in a specific part of an application.
In Angular 2, the RxJS asynchronous observables are first-class citizens and much of the core toolkit has been configured to rely upon them.
In Angular 2, the Http module now utilizes the Observable pattern by default to wrap XMLHttpRequest.
Angular 2 will often provide you with an Observable interface to attach to for free, but it is important to know how they are created, configured, and used.
One of the most obvious and useful cases of the Observer P attern is the one in which a single entity in your application unidirectionally communicates information to a field of listeners on the outside.
In Angular 1, the $emit and $broadcast behaviors were indeed very useful tools. They gave you the ability to send custom events upwards and downwards through the scope tree to any listeners that might be waiting for such an event.
The ways in which view collections can be altered are numerous and subtle. Thankfully, Angular 2 provides a solid foundation for tracking these changes.
RxJS Observables give you a lot of firepower, and it would be a shame to miss out on them.
Central to the behavior of single-page applications is the ability to perform navigation without a formal browser page reload.
Navigating around a single-page application is a fundamental task.
A simple but important choice for your application is which type of Location Strategy you want to make use of.
Building applications that you will want to build features that would involve which page the application is currently on.
Angular 2's component router offers you the necessary concept of child routes.
Angular 2 introduces native support for an awesome feature that seems to be frequently overlooked: matrix URL parameters.
The nature of single-page applications wholly controlling the process of routing gives them the ability to control each stage of the process.
Dependency injection is important as you can’t build an application without it.
We learnt service injection in the previous video. We also need to know how to control them. This video will teach you to do that.
As your application becomes more complex, you may come to a situation where you would like to use your services in a polymorphic style. This video enables you to do that.
Angular 2 provides you with the property of injecting a value instead of service instance.
A provider factory allows you to accept input, perform arbitrary operations to configure the provider, and return that provider instance for injection. So let’s learn how to do that here.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.