mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
Basic route stuff working
This commit is contained in:
@ -15,13 +15,20 @@
|
||||
</header>
|
||||
|
||||
<main class="has-header content">
|
||||
<a href="#cats">Cats</a>
|
||||
<a href="cats/">Cats</a>
|
||||
</main>
|
||||
</section>
|
||||
|
||||
<script src="RouteController.js"></script>
|
||||
<script>
|
||||
var rc = new RouteViewController({
|
||||
root: 'hacking/'
|
||||
});
|
||||
rc.when('route.html', function() {
|
||||
console.log('Loaded');
|
||||
});
|
||||
rc.when('cats', function() {
|
||||
console.log('Loaded');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user