Vuejs Internet Explorer的兼容性问题(版本10和11)
问题描述:
I hope this question/answer saves time for those having the same cross-compatibility issues with internet explorer.
问题: 我在项目中的一个使用vuejs2,它原来,有在Internet Explorer的早期版本中的一些兼容性问题。Vuejs Internet Explorer的兼容性问题(版本10和11)
首先,它深入到这个错误:
SCRIPT1014: Invalid character
然后这一个:
'Promise' is undefined
答
的第一个错误是指利用Ecmascript6回thicks(`)的简化了在javascript中使用字符串。 解决方案是使用连接HTML的旧方式。
至于第二误差,使用许诺的是不是在早期版本的Internet Explorer处理,所述解决方案是使用填充工具(其是确保向后在旧的浏览器,例如相容性的API:承诺)
in my case I used this:
<script src='https://cdn.polyfill.io/v2/polyfill.min.js'></script>