0
頁
我有一個framework7應用:Framework7無法正常加載
var myApp = new Framework7();
var $$ = Dom7;
var mainView = myApp.addView('.view-main', {
dynamicNavbar: true
});
myApp.onPageInit('index', function (page) {
console.log('index page');
mainView.router.loadPage('login.html');
}
它不會過渡到login.html的。
的Index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<link rel="stylesheet" href="lib/framework7/css/framework7.ios.min.css">
<link rel="stylesheet" href="lib/framework7/css/framework7.ios.colors.min.css">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/eventFeed.css">
<link rel="stylesheet" href="css/eventPage.css">
</head>
<body>
<!-- Status bar overlay for full screen mode (PhoneGap) -->
<div class="statusbar-overlay"></div>
<div class="panel-overlay"></div>
<div class="panel panel-left panel-reveal">
<div class="list-block theme-gray">
<div class="list-block-label" id="slideoutlist-name">User Profile</div>
<ul>
<a href="EventFeed.html" class="item-link item-content close-panel">Feed</a>
</ul>
<ul>
<a href="#" class="item-link item-content close-panel" id="logout">Logout</a>
</ul>
</div>
</div>
<div class="views">
<div class="view view-main">
<div class="navbar" id="navbar">
<div class="navbar-inner">
<div class="right">
<a href="#" class="link icon-only open-panel"><i class="icon icon-bars"></i></a>
</div>
</div>
</div>
<div class="pages navbar-through toolbar-through">
<div data-page="index" class="page">
<div class="page-content">
<div class="content-block">
<p>INDEX PAGE</p>
<a href="EventFeed.html">Feed</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="lib/framework7/js/framework7.min.js">
</script>
<script type="text/javascript" src="lib/jquery/jquery.min.js"></script>
<script type="text/javascript" src="lib/facebook/all.js"></script>
<script type="text/javascript" src="js/my-app.js"></script>
</body>
</html>
,登錄是https://framework7.io/docs/login-screen.html標準登錄。
這是工作大約一兩天前,直到我合併分行。然後我恢復到這個分支,但它仍然不起作用。如果我做mainView.router.loadPage('asdf.html')或任何其他頁面,它可以工作,但它不適用於login.html。爲什麼是這樣?