Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ng2-smart-table : how to use css?

anyone can help me how to use CSS to the ng2-smart-table compoment?

I wuold like to customize pagination , title, thead, tbody

thanks in advance Andrea

like image 503
Gelso77 Avatar asked Apr 09 '18 08:04

Gelso77


1 Answers

use below configuration in the settings object

attr: {
        class: 'table table-bordered'
      }, //this is for getting default table class

and

 :host /deep/ ng2-smart-table { 
    font-size: 16px; 
}//this for custom css

Example :

settings = {
  columns: {
    id: {
      title: 'ID'
    },
    name: {
      title: 'Full Name'
    },
    username: {
      title: 'User Name'
    },
    email: {
      title: 'Email'
    }
  },
attr: {
        class: 'table table-bordered'
      }
};
like image 164
Ankit Pant Avatar answered Oct 10 '22 13:10

Ankit Pant