Angular 2.0 final was made official just a few days ago and there’s never been a better time to dive in. In the last few weeks, we saw some pretty radical changes to the framework with the addition of the Ahead-of-Time(AoT) compiler, introduction of the @NgModule decorator and a new Forms Module. In this tutorial we are going to look at what’s changed with forms and more importantly how to handle form validation the right way with Angular 2.
Angular2 was built from the ground up with the primary goal of being fast and performant. While being fast right out of the box, the performance of Angular apps can be further enhanced really supercharge your app. These performance enhancements can be see as a pyramid where each level improves a certain performance metric.
Let’s look at each of these and how do they go about improving your app’s performance.
Angular 2 is massive. Just to create a “hello world” application, we might end up with a bundle of more than 2.5 MB. If you have a 50 mbps internet connection, that might not seem problematic but most people don’t have that privilege. What’s more, Angular 2 has now morphed into a multi-platform framework with the goal of creating mobile applications from the same codebase as your web application. Downloading 2.5 MB in an unreliable 3G connection with high latency is a big deal.
This cookbook describes how to radically improve performance by compiling Ahead of Time (AoT) during a build process.
Source: Ahead-of-Time Compilation