【发布时间】:2015-10-06 18:40:35
【问题描述】:
所有流行的前端框架(angular、ember、react 等)都使用专有的模板引擎。我想知道为什么使用专有模板语法而不是标准 html5 <template/> 标记。有技术原因吗?
【问题讨论】:
-
可能是为了兼容性。并非所有东西(我的意思是不是 IE)都支持
<template/>标签:caniuse.com/#search=template -
@Hazmat 旧 IE 现在是 Edge 了。
-
根据status.modern.ie/templateelement,只有Edge的preview版本(不是当前版本)支持
<template>。 -
我仍然相信可以为旧版浏览器实现 polyfill,不是吗?
标签: javascript html templates web-frontend