Onsen UI问题'白屏'angularJS代码出现

时间:2022-08-24 13:12:19

My cordova app is not worthy any more. It shows up angular expressions on application run. shows white screen at times at launch I think it might be issue of JS dependencies. I posting my JS dependencies order

我的Cordova应用程序不值得了。它在应用程序运行时显示角度表达式。在发布时有时显示白屏我认为这可能是JS依赖的问题。我发布了我的JS依赖顺序

<!-- JS dependencies (order matters!) -->
    <script src="scripts/platformOverrides.js" type="text/javascript"></script>
    <script src="lib/angular/angular.js" type="text/javascript"></script>
    <script src="lib/onsen/js/onsenui.js" type="text/javascript"></script>
    <script src="lib/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyD5sCjiaGLF8i8zul_W4GBsnMBY9mZTdB4&libraries=places"></script>

    <!-- Cordova reference -->
    <script src="cordova.js"></script>
    <script src="scripts/index.js" type="text/javascript"></script>
    <script type="text/javascript" src="bower_components/ngCordova/dist/ng-cordova.js"></script>

    <!-- CSS dependencies -->
    <link rel="stylesheet" href="lib/onsen/css/onsenui.css" />
    <link rel="stylesheet" href="lib/onsen/css/onsen-css-components-blue-basic-theme.css" />
  <!--   <link rel="stylesheet" type="text/css" href="lib/pace.theme.css"> -->
    <!-- CSP support mode (required for Windows Universal apps) -->
    <link rel="stylesheet" href="lib/angular/angular-csp.css" />
    <link rel="stylesheet" type="text/css" href="index.css">
    <link rel="stylesheet" href="animate.css" />

screenshot of issue

问题截图

Is this because of wrong order of the dependencies or internet problems or anything I'm missing or I could do to work it perfectly

这是因为依赖关系或互联网问题的错误顺序或我缺少的任何东西,或者我可以做到完美地工作

1 个解决方案

#1


0  

This might be a little late, but this can be solved by doing 2 things. 1.) Increase the time the splash screen is shown via the config.xml file to about 5000 ms. 2.) In the ons.ready() function, add: navigator.splashscreen.hide();

这可能有点晚了,但这可以通过做两件事来解决。 1.)通过config.xml文件将启动画面的显示时间增加到大约5000毫秒。 2.)在ons.ready()函数中,添加:navigator.splashscreen.hide();

This shows the splashscreen, hiding the white screen as your libraries load, and then hides it when the app is ready. This solved my problem.

这会显示启动画面,在您的库加载时隐藏白色屏幕,然后在应用程序准备就绪时隐藏它。这解决了我的问题。

#1


0  

This might be a little late, but this can be solved by doing 2 things. 1.) Increase the time the splash screen is shown via the config.xml file to about 5000 ms. 2.) In the ons.ready() function, add: navigator.splashscreen.hide();

这可能有点晚了,但这可以通过做两件事来解决。 1.)通过config.xml文件将启动画面的显示时间增加到大约5000毫秒。 2.)在ons.ready()函数中,添加:navigator.splashscreen.hide();

This shows the splashscreen, hiding the white screen as your libraries load, and then hides it when the app is ready. This solved my problem.

这会显示启动画面,在您的库加载时隐藏白色屏幕,然后在应用程序准备就绪时隐藏它。这解决了我的问题。