Search code examples
angularng2-smart-table

ng2-smart-table, align text


How can we align text to right in ng2-smart-table?


Solution

  • try this code, it works from my side.

    this.settings.columns["title"] = { "title": this.settings.columns["title"].title, type:'html',valuePrepareFunction: function(value){
         return '<div class="customformat"> ' + value + ' </div>' 
    }};
    

    CSS

     :host /deep/ .customformat{ text-align: right; }