我正在尝试向ng2-smart-table中的所有列添加* ngIf = booleanValue语句。我目前使用
检索了该组件@ViewChild('ng2Smart') test: ElementRef;
当我做的时候
ngAfterViewInit(){
console.log(this.test);
}
它返回
Ng2SmartTableComponent {settings: {…}, rowSelect: EventEmitter, userRowSelect: EventEmitter, delete: EventEmitter, edit: EventEmitter, …}
create
:
EventEmitter {_isScalar: false, observers: Array(0), closed: false, isStopped: false, hasError: false, …}
createConfirm
:
EventEmitter {_isScalar: false, observers: Array(0), closed: false, isStopped: false, hasError: false, …}
custom
:
EventEmitter {_isScalar: false, observers: Array(0), closed: false, isStopped: false, hasError: false, …}
defaultSettings
:
{mode: "inline", selectMode: "single", hideHeader: false, hideSubHeader: false, actions: {…}, …}
delete
:
EventEmitter {_isScalar: false, observers: Array(0), closed: false, isStopped: false, hasError: false, …}
deleteConfirm
:
EventEmitter {_isScalar: false, observers: Array(0), closed: false, isStopped: false, hasError: false, …}
edit
:
EventEmitter {_isScalar: false, observers: Array(0), closed: false, isStopped: false, hasError: false, …}
editConfirm
:
EventEmitter {_isScalar: false, observers: Array(0), closed: false, isStopped: false, hasError: false, …}
grid
:
Grid {createFormShown: false, onSelectRowSource: Subject, settings: {…}, dataSet: DataSet, source: ServerDataSource}
isAllSelected
:
false
isHideHeader
:
false
isHideSubHeader
:
false
isPagerDisplay
:
true
perPageSelect
:
{display: true, perPage: 20}
rowClassFunction
:
ƒ ()
rowHover
:
EventEmitter {_isScalar: false, observers: Array(0), closed: false, isStopped: false, hasError: false, …}
rowSelect
:
EventEmitter {_isScalar: false, observers: Array(0), closed: false, isStopped: false, hasError: false, …}
settings
:
{pager: {…}, actions: {…}, columns: {…}}
source
:
ServerDataSource {onChangedSource: Subject, onAddedSource: Subject, onUpdatedSource: Subject, onRemovedSource: Subject, data: Array(20), …}
tableClass
:
""
tableId
:
""
这正是我正在寻找的。我不确定从这里添加ngIf语句的最佳方法。任何帮助,将不胜感激。感谢