2015-08-28 96 views

回答

11

ECMAScript 6支持不依赖Cordova,是一个Webview问题。

如果将执行应用程序的本地Web视图支持ES6,那么您的应用程序将会很好用,否则不会。

由于ES6规范最终为approved on June 17 of this year (2015),因此对移动Web视图的ES6的实际支持缺失或不完整。

要运行的ECMAScript 6应用程序今天你可以使用BabelTraceur compiler,从ES6“编译”你的代码ES5。这也是在Angular 2 quickstart中使用的方法(参见traceur import in section“6. Declare the HTML”)。

那么,你为什么不尝试an Angular 2 generator that include traceurweb app generator with babel?如果您对所涉及的工具不熟悉,我建议您开始学习grunt/gulp/bower/yo。

+2

没有EC。它缩写为ES! – Bergi

+1

谢谢Bergi,这是一个非常虚拟的错字,修复! :) – lifeisfoo