admin管理员组文章数量:1289525
I'm working on supporting an existing AngularJS application to work with Internet Explorer 8.
For routing, I've used the AngularUI Router framework. It provides the ui-sref
directive to navigate to other states.
In the console of the IE8 Developer Tools, I get the following error for every element with the ui-sref=""
attribute.
TypeError: Object doesn't support this property or method
<a class=ng-binding href="" ui-sref="state-name">
Screenshot
Original HTML
<a ui-sref="state-name">Go to My State</a>
Probably because of this error, the navigation doesn't work. When I click the link, nothing happens.
Is there anyone who experienced similar problems before? Or can possibly guide me into the right direction?
I'm working on supporting an existing AngularJS application to work with Internet Explorer 8.
For routing, I've used the AngularUI Router framework. It provides the ui-sref
directive to navigate to other states.
In the console of the IE8 Developer Tools, I get the following error for every element with the ui-sref=""
attribute.
TypeError: Object doesn't support this property or method
<a class=ng-binding href="" ui-sref="state-name">
Screenshot
Original HTML
<a ui-sref="state-name">Go to My State</a>
Probably because of this error, the navigation doesn't work. When I click the link, nothing happens.
Is there anyone who experienced similar problems before? Or can possibly guide me into the right direction?
Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Nov 27, 2013 at 15:30 ndequekerndequeker 8,0107 gold badges62 silver badges94 bronze badges3 Answers
Reset to default 11The problem here is that IE8 doesn't support the method indexOf()
natively.
The solution is to include a ES5 shim, which provides support for indexOf()
.
Change it to data-ui-sref
rather than ui-sref
Check your method signature and argument expected is in synchronization. It fixed in my case.
本文标签: javascriptAngularJS and IE8unsupported property or methodStack Overflow
版权声明:本文标题:javascript - AngularJS and IE8 - unsupported property or method - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741404159a2376843.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论