0
코드에 나와 있습니다.
ngIf가 DOM에서 요소를 제거하거나 복제한다는 점을 알고 있지만 popover 지시어가 영향을받는 이유 (popover-is-open)가 표시되지 않습니다.
Plunker는 : https://plnkr.co/edit/eym62cur2cg1qyZzpQaf?p=previewngIf 내부에서 UI 부트 스트랩 팝업이 나타나지 않는 이유는 무엇입니까?
<div>
<input type="text"
uib-popover="This one will appear"
popover-placement="right"
popover-is-open={{true}}
/>
</div>
<div ng-if="true">
<input type="text"
uib-popover="This one will not appear because of ngIf even if true"
popover-placement="right"
popover-is-open={{true}}
placeholder="Why the ngIf prevent the popover to appear ??"
/>
</div>
나는 그것을 알고있다. 이유를 이해하고 싶습니다. 그게 버그 야? – Antoine
제 생각에 버그가 아니에요. ng-if를 평가 한 후에 동적으로 요소를 추가하기 때문에 팝업이 그 때까지 초기화되었을 것입니다. ng-show 숨기기/표시 (요소는 HTML에 이미 있음) 이후 팝 오버는 무엇이든 관계없이 바인딩합니다. 왜 ng-if를 사용할 때 표시되지 않는지. 희망이 의미가 있습니다. – Pradeepb