Angular 2 introduces an entirely new paradigm of applications. It wholly embraces all the newest concepts that are built into the next generation of browsers, and it cuts away all the fat and bloat from Angular 1. This course plunges directly into the heart of all the most important Angular 2 concepts.
This course helps you to migrate from Angular 1 application to Angular 2, familiarizes you with the Angular 2 components and covers the reworked Angular 2 form modules in depth.
About the Author
Matt Frisbie is currently a software engineer at Google. He was the author of the Packt bestseller AngularJS Web Application Development Cookbook, and also has published several video series through O’Reilly. He is also active in the Angular community, giving presentations at meetups and doing webcasts.
One of the unusual conventions introduced in Angular 1 was the relationship between directives and the data they consumed.
In Angular 1, there are several built-in directives, including ngController and ngInclude, that developers tend to lean on when building applications.
The 1.5 release of AngularJS introduced a new tool: the component. It isn't exactly similar to the concept of the Angular 2 component.
Angular 1 developers will be quite familiar with the factory/service/provider trifecta. In many ways, this has gone largely unaltered in Angular 2 conceptually.
Angular 2 comes with the ability to connect it to an existing Angular 1 application.
How to fully utilize Angular 2 components inside an Angular 1 template.
How to define a service type in Angular 2 and then inject it into an Angular 1 context.
When writing an application component in TypeScript, there are several new paradigms that you must become familiar and comfortable with.
With the departure of the Angular 1.x concept of $scope inheritance, mentally remodeling, It is important that how information would be passed around your application.
In Angular 1, it was expected that the developer would utilize the built-in replacement directives for element attributes that had meaningful DOM behavior attached to them.
In Angular 2, the other hemisphere of binding that is needed for a fully functioning application is event binding.
In the wake of the disappearance of $scope, Angular was left with a void for propagating information up the component tree.
In the course of creating applications, you will often find it useful to be able to attach component-style behavior to DOM elements, but without the need to have templating.
Utilizing components as standalone tags that are self-contained and wholly manage their contents is a clean pattern, but you will frequently find that your component tags demand that they enclose content.
Any developer that has used a client framework is intimately familiar with two basic operations in an application: iterative rendering from a collection and conditional rendering.
Many developers will begin with Angular 2 and reach for something that resembles the trustworthy ng-model in Angular 1.
One of the great new benefits of the new Angular binding style is that you are able to more accurately target what you are binding to.
Angular's component rendering process has a large number of facets, and different types of data and references will become available at different times.
In the course of building an application, you may encounter a scenario where it would be useful to reference a parent component from a child component, such as to inspect member data or invoke public methods.
Depending on your application's separation of concerns, it might make sense for a child component in your application to reference a parent, and at the same time, for the parent to reference the child.
The companion to Angular's ViewChild is ContentChild. It performs a similar duty; it retrieves a reference to the target child component and makes it available as a member of the parent component instance.
Angular 2 still has two-way data binding, but the way it behaves is a bit different from what we're used to.
The simplest form behavior imaginable would be the validation of a single input field
Forms in applications frequently exist to aggregate multiple instances of input into a unified behavior.
FormGroups are more than capable of serving your needs for the purpose of combining many FormControl objects into one container.
Angular provides mechanisms with which you can implicitly create and assign these objects and attach them to the form's DOM elements.
Angular provides a way for you to put together forms that don't rely on the template hierarchy for definition.
The basic built-in validators that Angular provides will get you off the ground.
Angular will run this validation every time the validator is invoked, which might be quite often if form validation is bound to rapid-fire events.
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.