T
T
tyoma_koder2021-10-15 13:15:06
Angular
tyoma_koder, 2021-10-15 13:15:06

How does passing data between angular components work?

They write what is needed in the parent component A in the child . But for some reason, Angular requires me to assign some value to var in the child component, although there is no such value in any instruction, I have to write empty values ​​or integer objects each time if it is an interface, is there not such a bad way?
<a [var]="value" routerLink="/page">link</a>
@Input() var:string

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lssssssssssl, 2021-10-15
@tyoma_koder

Well
, in general, a useful thing, and it is desirable to write your code so that you do not have to turn it off.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question