From 8ec7e071d5353afd68d6a0ae1359492904b842fa Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Sun, 5 May 2013 18:06:37 -0700 Subject: [PATCH] Very basic routing. chapter5-1 --- .meteor/packages | 1 + .meteor/versions | 8 ++++++++ client/main.html | 12 ------------ client/templates/application/layout.html | 12 ++++++++++++ lib/router.js | 5 +++++ 5 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 client/templates/application/layout.html create mode 100644 lib/router.js diff --git a/.meteor/packages b/.meteor/packages index b8c9dacd..251e942c 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -19,3 +19,4 @@ ecmascript # Enable ECMAScript2015+ syntax in app code insecure # Allow all DB writes from clients (for prototyping) twbs:bootstrap underscore +iron:router@1.0.0-rc.1 diff --git a/.meteor/versions b/.meteor/versions index f1a2d63e..0a29b1ef 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -29,6 +29,14 @@ htmljs@1.0.5 http@1.1.1 id-map@1.0.4 insecure@1.0.4 +iron:controller@1.0.12 +iron:core@1.0.11 +iron:dynamic-template@1.0.12 +iron:layout@1.0.12 +iron:location@1.0.11 +iron:middleware-stack@1.0.11 +iron:router@1.0.12 +iron:url@1.0.11 jquery@1.11.4 launch-screen@1.0.4 livedata@1.0.15 diff --git a/client/main.html b/client/main.html index 8fa9a72d..2624b762 100644 --- a/client/main.html +++ b/client/main.html @@ -1,15 +1,3 @@ Microscope - -
- -
- {{> postsList}} -
-
- \ No newline at end of file diff --git a/client/templates/application/layout.html b/client/templates/application/layout.html new file mode 100644 index 00000000..54050e07 --- /dev/null +++ b/client/templates/application/layout.html @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/lib/router.js b/lib/router.js new file mode 100644 index 00000000..009fea21 --- /dev/null +++ b/lib/router.js @@ -0,0 +1,5 @@ +Router.configure({ + layoutTemplate: 'layout' +}); + +Router.route('/', {name: 'postsList'});