1, ng-transclude
在IE8下面,错误: TypeError: Object doesn't support this property or method
指令模板
<button ng-click="open()">open</button>
<div class="overlay" ng-class="{'show': isOpen}">
<a href="javascript:void(0)" class="closebtn" ng-click="close()">×</a>
<div class="overlay-content">
<div ng-transclude></div>
</div>
</div>
正确:
<div jm-fullscreen open="onOpen()">
<!--ng-transclude issue:-->
<!--if it is no parent container(div) for a tags, it will throw bellow errors in IE8-->
<!--TypeError: Object doesn't support this property or method-->
<div>
<a href="#">About</a>
<a href="#">Services</a>
<a href="#">Clients</a>
<a href="#">Contact</a>
</div>
</div>
错误:
<div jm-fullscreen open="onOpen()">
<!--ng-transclude issue:-->
<!--if it is no parent container(div) for a tags, it will throw bellow errors in IE8-->
<!--TypeError: Object doesn't support this property or method-->
<a href="#">About</a>
<a href="#">Services</a>
<a href="#">Clients</a>
<a href="#">Contact</a>
</div>
网友评论