Articles tagged with: AngularJS 2

Angular 2 Forms – a first look

A first quick look at the new Forms API in Angular 2.

Angular 2 gets a brand new Forms API. It’s fresh out of the compiler and since there’s not much documentation around yet, @angular_zonepowered by Gerard Sans and Wassim Chegham organized a Google Hangout with Kara Erickson, core contributor to the Forms Api. Here I’m basically summarizing the main points and created a runnable Plunker for you to play with.

Source: Angular 2 Forms – a first look

Custom Form Controls in Angular 2

Angular 2 comes with great built-in support for everything related to native form controls. However, sometimes we want to create our own custom form controls with their own appearance and custom functionality. These custom controls should integrate nicely with Angular’s forms APIs and in this article we explore how that works.

Source: Custom Form Controls in Angular 2

Angular Router: Empty Paths, Componentless Routes,… | Victor Savkin

At the core of the Angular router lies a powerful URL matching engine, which transforms URLs and converts them into router states.

In this article I will show how to use three of the engine’s features: empty-path routes, componentless routes, and redirects. And how using them together, we can implement advanced patterns in just a few lines of code.

Source: Angular Router: Empty Paths, Componentless Routes,… | Victor Savkin

Angular 2: Connect your custom control to ngModel and ngControl with Control Value Accessor.

So you are starting to flex your new Angular 2 muscles and have built the mother of all custom form controls. I mean that thing can do everything except make coffee… And then the moment comes to extract and use it as a separate component in your application.

You plug it into your HTML form with ngControl, thinking your work is done and as your browser refreshes you start seeing all sorts of errors appearing on the console. Attaching it to ngModel produces similar errors.

As it turns out, your journey is far from over and today we will take a look at whatAngular2 expects from you if you want to build components that can talk to directives like ngControl and ngModel.

Source: Angular 2: Connect your custom control to ngModel and ngControl with Control Value Accessor.