[英]Angular 2. How can I bootstrap mobile app if a device is not desktop
I need something like that 我需要这样的东西
let supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;
let Module= supportsTouch ? MobileApp : DesktopApp;
platformBrowserDynamic().bootstrapModule(Module);
But i've got: Tried to find bootstrap code, but could not. 但是我有:试图找到引导程序代码,但是找不到。 Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options.
指定可静态分析的引导程序代码,或将entryModule传递给插件选项。
Maybe someone faced this problem. 也许有人遇到了这个问题。
You can use abc - https://github.com/thruthesky/abcframework which will bundle Angular into Cordova apps. 您可以使用abc- https://github.com/thruthesky/abcframework ,它将Angular捆绑到Cordova应用程序中。
abc gives a great convenience when you are working with Angular and want to build mobile apps. 当您使用Angular并想要构建移动应用程序时,abc提供了极大的便利。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.