Recently I added Ahead-of-Time (AoT) compilation support to angular2-seed and received a lot of questions about it. In this post we’re going to explore in depth the Angular 2 AoT compilation. We will start from the beginning by answering the following questions:
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
Angular 2 Tutorial: Making HTTP requests is a vital operation in the life of most front-end applications.
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.
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.
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.