2017-10-10 93 views
0

不工作我在科爾多瓦的應用程序正與Angularjs和一切看起來在Chrome和其他瀏覽器的罰款。但是,如果我嘗試將apk安裝到Android,Angularjs不會在啓動時執行index.html。角在應用程序啓動

然而,這是最奇怪的:如果我改變爲其他頁面,並返回到index.html的,看起來沒什麼問題的!如果我關閉應用程序並重新啓動,一切都會正常進行。有時候,只是在幾次之內,它只能在index.html中重複。

我的index.html開播時:

enter image description here

正如我所說,網頁作品在大多數情況下,罰款:

enter image description here

我使用的是Android 7.1。 1 /科爾多瓦7.0.1 /角1.6.4

index.html的:(每個 'NG-INIT' 內部 'NG-貓頭鷹傳送帶' 使一個$ HTTP REQ uest)

<!DOCTYPE html> 
<html ng-app="baseApp"> 
<head> 
<link rel="stylesheet" href="css/uikit.css" /> 
<link rel="stylesheet" href="css/header.css" /> 
<link rel="stylesheet" href="css/custom.css" /> 
<link rel="stylesheet" href="css/owl.carousel.min.css"> 
<link rel="stylesheet" href="css/animate.css" /> 

<script src="js/jquery.js"></script> 
<script src="js/uikit.min.js"></script> 
<script src="js/owl.carousel.js"></script> 
<script src="js/angular.min.js"></script> 
<script src="js/angular-owl-carousel-2.js"></script> 
<script src="js/index.js"></script> 
<script src="js/controller-home.js"></script> 
<script src="js/controller-list.js"></script> 
<script src="js/controller-rede.js"></script> 
<script src="js/controller-config.js"></script> 

</head> 
<body ng-controller="carousel" ng-cloak> 
<header ng-include="'templates/header-search.html'"></header> 

<section> 
<ng-owl-carousel class="owl-theme" owl-items="items" owl-properties="properties" owl-ready="ready($api)"> 
<div ng-controller="home"> 
<div ng-include="'templates/home.html'" ng-show="owl_page == 0" ng-init="init_home();"></div> 
</div> 
<div ng-controller="listas"> 
<div ng-include="'templates/listas.html'" ng-show="owl_page == 1" ng-init="init_listas();"></div> 
</div> 
<div ng-controller="rede"> 
<div ng-include="'templates/rede.html'" ng-show="owl_page == 2" ng-init="generalSearchFilter('notify');"></div> 
</div> 
<div ng-controller="config"> 
<div ng-include="'templates/config.html'" ng-show="owl_page == 3" ng-init="init_config();"></div> 
</div> 
</ng-owl-carousel> 
</section> 

<footer id="footer" ng-include="'templates/footer.html'"></footer> 

<script src="cordova.js"></script> 
</body> 
</html> 
+0

你可以分享你的index.html? – Keerthi

+0

HMTL分享了Keerthi。謝謝! – ASilva

+0

你可以嘗試添加角腳本,在HTML的第一個腳本標籤和嘗試? – Keerthi

回答

0

幾天以後,我決定改變我所有的index.html,我改變我的代碼,使用$ routeProvider代替NG-包括,我也有「angular.element取代我最初的功能(文件) .ready'+ $超時。好結局! :)