-
Book Overview & Buying
-
Table Of Contents
Hands-On Full-Stack Web Development with ASP.NET Core
By :
As stated before, apps today use components to better structure the user interface. The idea is to break down the app to a set of encapsulated and reusable scoped components and avoid the primitive monolith approach.
Consequently, the user interface is built from a hierarchical component graph, comprising parent and child components. Often, this situation requires some sort of parent-child interaction control, such as the following:
Angular supports these two common scenarios using input and output.
The @Input decorator is used when a component is supposed to receive data passed down from its parent. When a field or property is set as input, the parent can specify the value via standard assignment.
Let's use input in the category menu-related components:
src/app/model.