Thursday, 31 December, 2015 UTC


Summary

 
Angular 2 Components
In this lesson, we are going to introduce components in Angular 2. In Angular 1, the prevalent theme was a controller and template pair. The initial approach was to build out an HTML template and hook up a controller via ngController. As our application grew, so did our controller. This eventual became untenable and ultimately we ended up either dividing our application up into named states via ui-router or with directives.
Angular 2 expands on this idea by introducing components which gives us a really clean way to compose and extend our applications. We are going to walk through an exercise that we use quite a bit at AngularClass to introduce components in the context of a working application so you can get your feet wet without getting bogged down in the details.
Grab the sample project at this link https://github.com/simpulton/angular2-website-routes and let’s get started!
We are going to be focusing on components in this lesson but if you want to learn more about the sample application, you can read about it in this post Get Started with Angular 2 by Building a Simple Website
Resources
Sample Project
Component Documentation
Template Documentation
Router Documentation
The post Angular 2 Components for Beginners appeared first on AngularClass.