Some packages include providers, encapsulations, changeDetections, and host in their code. What do these elements mean and how do they impact the behavior of the component class based on the following code snippet?
@Component({
selector: 'ng-select',
templateUrl: './ng-select.component.html',
styleUrls: ['./ng-select.component.scss'],
providers: [{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => NgSelectComponent),
multi: true
}],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
host: {
'role': 'listbox',
'class': 'ng-select',
'[class.ng-select-single]': '!multiple',
}
})