angular - ng2-smart-table,对齐文本

标签 angular ng2-smart-table

我们如何在 ng2-smart-table 中将文本右对齐?

最佳答案

试试这个代码,它对我有用。

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

关于angular - ng2-smart-table,对齐文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49781001/

相关文章:

javascript - Jest : SyntaxError: Unexpected token export

angular - Ionic 2/Angular 2 计时器

angular - ng2-smart-table 派生列

javascript - ng2-smart-table 将 'Add New' 按钮事件绑定(bind)到外部按钮

angular - 如何更改 ng2 智能表列宽?

angular - 是否可以为 Angular 应用程序配置端口号?

java - 如何为 API 测试创建 JSESSIONID

angular6 - 如何在ng2-smart-table的下拉菜单中设置多项选择?

javascript - ng2-smart-table如何更改自定义按钮在点击时的显示和隐藏

angular - 如何保持 ngrx 干燥?