Search code examples
cssangularng2-smart-table

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


Solution

  • 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'
          }
    };