O'Reilly logo

Developing an Angular 2 Edge by Ran Wahle, Mary Gualtieri, Wojciech Kwiatek, Suguru Inatomi, Filip Lauc, Troy Mott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Components

Components are Angular 2 building blocks that contain both logic and UI behavior. Components contain both HTML templates and classes. You can say that component classes are like Angular 1.x controllers.

You can compare components to an Angular 1.x directive, however, a definition of a component is one autonomic module that contains both UI and UI-oriented logic. If you are familier with Angular 1.x, you may compare a controller to a small module that contains both an HTML template and a controller, all while the exported class acts as the controller.

Components in Angular 2.0 increase the HTML element name vocabulary with the app’s components, in the same way that HTML5 web components are supported in Angular 2.0.

While ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required