Suppose we have a Parent component(inside it, there is an Animal class that Cat and Dog extends from) with two child components(Cat and Dog), cat and dog button are always in opposite status, click the cat button can make dog button disable, and click the dog button can make the cat button disable. How can I implement it?
@Component
...,
template: `<cat></cat>
<dog></dog>`
class ParentComponent {
}
export class Animal {
}
@Component
...
class Cat extends Animal {
}
@Component Dog extends Animal {
}