Try to search your question here, if you can't find : Ask Any Question Now ?

Providers,ChangeDetection,Encapsulations,host in Angular component definitions

HomeCategory: stackoverflowProviders,ChangeDetection,Encapsulations,host in Angular component definitions
craig asked 2 weeks ago

I see some packages where they give providers, encapsulations, changeDetections, host as the following piece of code. What do they mean and how does it behave in the component class with respect to the following code.

    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',
        '[]': '!multiple',
1 Answers
Best Answer
Mannu answered 2 weeks ago
Your Answer

11 + 14 =

Popular Tags

WP Facebook Auto Publish Powered By :