2016-06-23 1 views
1

각 헤더 셀의 UI 그리드에 툴팁 설명을 넣어하는 방법내가 UI 그리드의 헤더 셀에 angulars에게 부트 스트랩 툴팁을 사용하는 습관

$scope.gridOptions = { 
//some settings 
columnDefs: [ 
    { 
    field: someId, 
    displayName: 'Name', 
    headerCellTemplate: 'linkToTemplate' //default headerCellTemplate with uib-tooltip={{tooltipDescription}}, 
    tooltipDescription: 'Tooltip description' //it's not working 
    } 
] 
} 

headerCellTemplate :

<div role="columnheader"> 
.... 
    <span class="ui-grid-header-cell-label"> 
    {{col.displayName}} 
    </span> 
    <span class="icon" uib-toolotp='{{col.tooltipDescription}}' tooltip-placement='right'></span>//it's not working 
.... 
</div> 

올바른 방법은 무엇입니까 각 헤더 셀에 툴팁 설명을 넣으시겠습니까?

+0

내가 슈어하지 오전하지만 당신은 UI-툴팁을 사용하지 않는 이유는 무엇입니까? {button {{placement.selected}} "type ="button "class ="btn btn-default "> 도구 설명 {{게재 위치} .selected}} – Vitalii

+0

죄송합니다. 잘못된 예입니다. headerCellTemplate에서 uib-tooltip을 사용하고 있습니다. 질문은 $ scope.gridOptions 또는 $ scope.gridOptions.columnDefs의 템플릿에 툴팁에 대한 설명을 넣는 방법입니다. uib-toolotp = 'some description'과 같이 템플릿의 tooltipDescription을 하드 코드 할 필요가 없습니다. 모든 헤더 셀에 공통된 템플릿이기 때문입니다. – rossoneri

+0

이 uib-tooltip-template = cell [ 'template'] – Vitalii

답변

0

각 셀 등 필드 나 displayName tooltipDescription 같은 모든 속성에 액세스 할 수있는 col.colDef 속성이

관련 문제