ng2-smart-table : how to use css?
Asked Answered
T

1

5

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

Testate answered 9/4, 2018 at 8:19 Comment(0)
A
8

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'
      }
};
Actaeon answered 10/4, 2018 at 19:24 Comment(1)
thank you so much, do yo know how can i put a style for the item selected?Testate

© 2022 - 2024 — McMap. All rights reserved.