0
在我的離子應用程序中,當index.html
包含的腳本第一次加載時,但在回到相同的屏幕腳本沒有運行時。離開的應用程序腳本返回後沒有重新加載
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="cordova.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script>alert(1)</script>
</head>
<body ng-app="starter">
<ion-nav-view> </ion-nav-view>
</body>
</html>
homepage.html
<ion-view>
<ion-nav-bar align-title="center" class=" bar-royal">
<ion-nav-title>
<span>Find Hotels</span>
</ion-nav-title>
</ion-nav-bar >
<ion-content padding="true">
alerted 1 on initial load but not after moving back to same page
</ion-content>
</ion-view>
我正在使用'$ ionicConfigProvider.views.maxCache(0);'和cache在離子視圖中設置爲false。我實際上使用谷歌地圖api,所以我怎麼能在'$ ionicView.enter'中輸入它 – sam