I am new to Angular and I have discovered a method for passing data between components in Angular using @Input
:
In the parent component:
...
<app-child [childMessage]="parentMessage"></app-child>
...
In the child component:
...
@Input() childMessage: string;
...
However, in my situation,
I am unable to call the selector of the component that I want to pass.
How can I still pass the data?
Note: When I say "call," I mean doing this -->
<app-child></app-child>