简体   繁体   English

Angular2。如果设备不是台式机,如何引导移动应用程序

[英]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.

相关问题 在Angular 2中使用嵌套的引导程序模态。如何在单击外部时防止Bootstrap Modal消失 - Using nested bootstrap modal in Angular 2. How can I prevent Bootstrap Modal from disappearing when clicking outside Angular2。如何在文本中替换或包含组件 - Angular 2. How can I replace or include component into text 带有 Angular 9 的 Ionic 5:如何从桌面打印(非移动设备) - Ionic 5 with Angular 9: How to Print from Desktop (not mobile device) Angular 中移动设备和桌面的不同布局/路线 - Different layout/route for mobile device and desktop in Angular 如何在 Angular app 中查看手机通话记录? - How can I access the call log of mobile phone in Angular app? 如何自定义 Ionic 2 应用程序组件以呈现移动设备和桌面设备的内容? - How can I customize the Ionic 2 app component to present content for both mobile and desktop? 如何引导与常春藤路由的角度应用程序? - How can I bootstrap an angular app that has routing with ivy? 如何在 Angular 应用程序中更改由 Bootstrap 生成的 CSS? - How can I change CSS generated by Bootstrap in an Angular app? Angular2。可以从app.component之外的任何地方访问服务 - Angular 2. Can access to the service from everywhere but app.component 如何在具有相同网络的移动设备上打开 angular 应用程序 - how to open angular app on mobile device with same network
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM