Created
June 2, 2015 19:00
-
-
Save vic/d0dd0d09050a794c5b97 to your computer and use it in GitHub Desktop.
Framework7 router.back bug?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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"> | |
<link rel="stylesheet" href="bower_components/framework7/dist/css/framework7.css"> | |
<link rel="stylesheet" href="bower_components/framework7/dist/css/framework7.themes.css"> | |
</head> | |
<body> | |
<div class="views"> | |
<div class="view view-main"> | |
<div class="pages"> | |
<div class="page" data-page="social"> | |
<div class="page-content"> | |
<h1>This is Social</h1> | |
<p>Navigate up to profile 4 and then click on back to social.</p> | |
<a class="link" href="#profile1">@Profile1</a> | |
</div> | |
</div> | |
<div class="page cached" data-page="profile1"> | |
<div class="page-content"> | |
<h1>Profile1</h1> | |
<p>Navigate up to profile 4 and then click on back to social.</p> | |
<a class="link" href="#profile2">@Profile2</a> | |
</div> | |
</div> | |
<div class="page cached" data-page="profile2"> | |
<div class="page-content"> | |
<h1>Profile2</h1> | |
<p>Navigate up to profile 4 and then click on back to social.</p> | |
<a class="link" href="#profile3">@Profile3</a> | |
</div> | |
</div> | |
<div class="page cached" data-page="profile3"> | |
<div class="page-content"> | |
<h1>Profile3</h1> | |
<p>Navigate up to profile 4 and then click on back to social.</p> | |
<a class="link" href="#profile4">@Profile4</a> | |
</div> | |
</div> | |
<div class="page cached" data-page="profile4"> | |
<div class="page-content"> | |
<h1>Profile4</h1> | |
<button class='back-to-social'>Back to Social</button> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<script src="bower_components/jquery/dist/jquery.js"></script> | |
<script src="bower_components/framework7/dist/js/framework7.js"></script> | |
<script> | |
var app = new Framework7({ | |
pushState: true | |
}); | |
var mv = app.addView('.view-main', { | |
domCache: true | |
}); | |
jQuery(document).on('click', '.back-to-social', function () { | |
mv.router.back({ url: '#social', force: true }) | |
}) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment