tootltip
및 trusashtml
도 사용하고 있지만 텍스트는 HTML로 파싱되지 않는 문자열로 표시됩니다.html 태그가 uib-tooltip에서 작동하지 않습니다.
HTML :
<label uib-tooltip="{{TooltipText}}"
tooltip-enable="!showEditHours"
for="IsAttested"
ng-class="{'Cursor_Auto': !showEditHours}">Text</label>
컨트롤러 :
$scope.ad = { 'text': 'This attestation is editable only when the <b> Hours of the Accounting Firm of the Issuer </b> section has been enabled for edit. Please click on the Edit <b> Hours of the Accounting Firm of the Issuer </b> button.' };
$scope.TooltipTextAttestationFinalName = $sce.trustAsHtml($scope.ad.text);
감사를보십시오. –
이것 뒤에 이유는 무엇입니까 ?? –
'uib-tooltip-html' 지시어는 각도 표현식을 입력으로 받지만'{{someVar}}'는 실제로 지시문을 지시문에 전달하기 전에 표현식을 평가하므로 지시문 만 get 문자열을 가져다가 다시 평가하려고합니다 실패합니다). 예를 들어,'$ scope.someVar = '이것은 문자열입니다.'라고 선언하고 이것을'uib-tooltip-html = '{{someVar}}' '처럼 전달하면 툴팁 지시문은 '$ string [ '이것은 문자열입니다']하지만 분명히 작동하지 않을 것입니다. 댓글에서 명확하게 설명하기가 약간 어렵습니다. :-) –