Ngx-datatable: why do I get "Cannot find name 'ViewEncapsulation'" when adding encapsulation: ViewEncapsulation.None??

Created on 2 Nov 2017  路  1Comment  路  Source: swimlane/ngx-datatable

I'm new to ngx-datatable

Why do I get "Cannot find name 'ViewEncapsulation'" when adding encapsulation: ViewEncapsulation.None??

I'm sure its something simple that I'm missing - a little help would be appreciated.

@Component({
selector: 'app-datatable',
styles: [ .datatable-header-cell-label { font-weight: bold; color: red ; } ],
template: <div> <ngx-datatable [rows]="college" [columns]="columns" [columnMode]="standard" > </ngx-datatable> </div> ,
encapsulation: ViewEncapsulation.None
})

Thanks - Tony

Most helpful comment

You need to add ViewEncapsulation from angular/core:

import { Component, ViewEncapsulation } from '@angular/core';

>All comments

You need to add ViewEncapsulation from angular/core:

import { Component, ViewEncapsulation } from '@angular/core';

Was this page helpful?
0 / 5 - 0 ratings