Answers for "angular host binding class on input"

1

angular host binding class on input

// Non objects
@HostBinding('class.active') @Input() active: boolean = false;

// With objects
@Input() something: obj;
@HostBinding('class.active')
get isActive(): boolean {
  return this.obj.isActive;
}
Posted by: Guest on June-01-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language