A better template syntax

In Chapter 1, Creating Our Very First Component in Angular, we saw how to embed HTML templates in our components, but we didn't even scratch the surface of template development for Angular. As we will see later in this book, template implementation is tightly coupled with the principles of Shadow DOM design and it brings out a lot of syntactic sugar to ease the task of binding properties and events in our views in a declarative fashion.

In a nutshell, Angular components may expose a public API that allows them to communicate with other components or containers. This API may encompass input properties, which we use to feed the component with data. It also may expose output properties we can bind event listeners to, thereby getting prompt information about changes in the state of the component.

Let's take a look at the way Angular solves the problem of injecting data in and out of our components through quick and easy examples. Please focus on the philosophy behind these properties. We will have a chance to see them in action later.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset