Created
July 31, 2012 22:16
-
-
Save lvbreda/3221138 to your computer and use it in GitHub Desktop.
Revisions
-
lvbreda revised this gist
Jul 31, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,8 @@ if (Meteor.is_client) { document.body.innerHTML = ""; page = page?page:"index"; var frag = Meteor.ui.render(function () { var i = Template[page]?Template[page]():""; return i; }); document.body.appendChild(frag); } -
lvbreda created this gist
Jul 31, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ if (Meteor.is_client) { var Router = Backbone.Router.extend({ routes: { "" : "main", ":page": "main" //this will be http://your_domain/ }, main: function(page) { document.body.innerHTML = ""; page = page?page:"index"; var frag = Meteor.ui.render(function () { return Template[page](); }); document.body.appendChild(frag); } }); var app = new Router; Meteor.startup(function () { Backbone.history.start({pushState: true}); }); } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ <template name="hello"> hello </template> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ <template name="index"> home </template> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ <head> <title>Stackoverflow</title> </head> <body> </body>