-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added ability to control the caching of template url, allowing templa…
…te url set to server side pages
- Loading branch information
1 parent
92dee3d
commit 8b9365d
Showing
12 changed files
with
111 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<html> | ||
<title>JS Router | Basic</title> | ||
|
||
<head></head> | ||
|
||
<body> | ||
<div class="menu"> | ||
<a href="#/">Home</a> | <a href="#/cache">Cached</a> | <a href="#/non-cache">Not Cached</a> | ||
</div> | ||
<div class="my-view"></div> | ||
<footer class="footer" style="clear:both; text-align: center"> | ||
<p>jq-router is maintained by <a href="https://github.com/muzammilkm">muzammilkm</a></p> | ||
<p>go to jq-router <a href="/jq-router">documentation</a></p> | ||
</footer> | ||
<script type="text/javascript" src="../scripts/jquery-3.2.1.min.js"></script> | ||
<script type="text/javascript" src="../scripts/jq-router.js"></script> | ||
<script type="text/javascript"> | ||
var routes = {}, | ||
defaultRoute = 'home'; | ||
|
||
routes['home'] = { | ||
url: '#/', | ||
templateUrl: 'templates/home.html' | ||
}; | ||
|
||
routes['cache-route'] = { | ||
url: '#/cache', | ||
cache: true, | ||
templateUrl: 'templates/cache-route.html' | ||
}; | ||
|
||
routes['non-cache-route'] = { | ||
url: '#/non-cache', | ||
cache: false, | ||
templateUrl: 'templates/non-cache-route.html' | ||
}; | ||
|
||
$.router | ||
.setData(routes, false) | ||
.setDefault(defaultRoute); | ||
|
||
$.when($.ready) | ||
.then(function() { | ||
$.router.run('.my-view', 'home'); | ||
}); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<h1>Cache Page</h1> | ||
<p> | ||
Look in network tab... | ||
</p> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>Home</h1> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<h1>Non-Cache Page</h1> | ||
<p> | ||
Look in network tab... | ||
</p> |
This file contains 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
This file contains 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
This file contains 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