Angular 8, can checkbox value pass onto components? not not in a parent/child relation
问题 <input type=checkbox [(ngModel)]="myCheckBox" (ngChanged)="!myCheckBox"> for example, if I want the code above to pass the "checked" value, which is "true or false" to other components, so its contents can react based on "myCheckBox" true | false, and they are not in a parent child relationship, is there any way I can do that? Please help, really apprecipate it!!!! 回答1: You can implement it by different methods. For example: with EventEmitter or rxjs( Subject, BehaviourSubject); In my example