Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 既有火焰(网)又有棱角(移动)的流星_Javascript_Angularjs_Cordova - Fatal编程技术网

Javascript 既有火焰(网)又有棱角(移动)的流星

Javascript 既有火焰(网)又有棱角(移动)的流星,javascript,angularjs,cordova,Javascript,Angularjs,Cordova,我想创建我的Meteor web应用程序的移动/cordova版本。web版本使用blaze——我想坚持使用blaze——而对于移动应用程序版本,它似乎是UX的最佳选择。Ionic或多或少与Angular相耦合,这会在运行时产生模板冲突: error: conflict: two packages included in the app (angular-templates and templating) are both trying to handle *.html error: confl

我想创建我的Meteor web应用程序的移动/cordova版本。web版本使用blaze——我想坚持使用blaze——而对于移动应用程序版本,它似乎是UX的最佳选择。Ionic或多或少与Angular相耦合,这会在运行时产生模板冲突:

error: conflict: two packages included in the app (angular-templates and templating) are both trying to handle *.html
error: conflict: two packages included in the app (pbastowski:angular-babel and ecmascript) are both trying to handle *.js

比如说,除了把我的项目分成两部分来创建一个独立的非blaze回购协议外,还有没有其他方法可以将meteor配置为仅在应用程序运行cordova时使用angular/babel

经过一番挖掘和研究,我得出以下结论:

Meteor中解决这类问题的典型方法似乎是将应用程序分解为一组包

对于包,可以更好地控制依赖项的加载方式和加载位置。所以在这个特殊的例子中,至少有两个包——一个包含特定于浏览器的代码,另一个包含特定于Cordova的代码

下面是一个简单的应用程序示例,该应用程序分为支持移动和基于web的体验的软件包:


这里有一个关于将现有应用程序分解为基于包的体系结构的非常全面的教程:

经过一番深入挖掘和研究,我得出以下结论:

Meteor中解决这类问题的典型方法似乎是将应用程序分解为一组包

对于包,可以更好地控制依赖项的加载方式和加载位置。所以在这个特殊的例子中,至少有两个包——一个包含特定于浏览器的代码,另一个包含特定于Cordova的代码

下面是一个简单的应用程序示例,该应用程序分为支持移动和基于web的体验的软件包:

这里有一个相当全面的教程,介绍如何将现有应用程序分解为基于包的体系结构: