Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question