| Ops | Angular | React |
|---|---|---|
| Call | <app-button color="{{show ? 'red' : 'green' }}"/> |
<Button text={show ? 'Close' : 'Add'} /> |
| Definition | @Input() color!: string; |
export default function Button({text,color}) {} |
| Reference | <button [ngStyle]="{'background-color': color}">{{text}}</button> |
<button style={{backgroundColor:color}}> {text} </button> |
- Header.ts