Pass values from one component to another component

Last Updated on

In the component where you will be receiving the value, include in your component ts file the variable with the @Input annotation — with in the class:

  item_id: number;

Then, in the component where you are working with the HTML, include the name of the receiving component with the [variable]=”value” parameter:

<div style="border:1px solid green">

    <app-logic10-base-ingredients [item_id]=""></app-logic10-base-ingredients>

Lämna ett svar