Permalink
Browse files

Very basic routing.

chapter5-1
  • Loading branch information...
tmeasday committed May 6, 2013
1 parent 7b26a11 commit 8ec7e071d5353afd68d6a0ae1359492904b842fa
Showing with 26 additions and 12 deletions.
  1. +1 −0 .meteor/packages
  2. +8 −0 .meteor/versions
  3. +0 −12 client/main.html
  4. +12 −0 client/templates/application/layout.html
  5. +5 −0 lib/router.js
View
@@ -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
View
@@ -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
View
@@ -1,15 +1,3 @@
<head>
<title>Microscope</title>
</head>
-<body>
- <div class="container">
- <header class="navbar navbar-default" role="navigation">
- <div class="navbar-header">
- <a class="navbar-brand" href="/">Microscope</a>
- </div>
- </header>
- <div id="main">
- {{> postsList}}
- </div>
- </div>
-</body>
@@ -0,0 +1,12 @@
+<template name="layout">
+ <div class="container">
+ <header class="navbar navbar-default" role="navigation">
+ <div class="navbar-header">
+ <a class="navbar-brand" href="{{pathFor 'postsList'}}">Microscope</a>
+ </div>
+ </header>
+ <div id="main">
+ {{> yield}}
+ </div>
+ </div>
+</template>
View
@@ -0,0 +1,5 @@
+Router.configure({
+ layoutTemplate: 'layout'
+});
+
+Router.route('/', {name: 'postsList'});

1 comment on commit 8ec7e07

@Vivais

This comment has been minimized.

Show comment
Hide comment
@Vivais

Vivais Dec 4, 2017

for windows user:
meteor add iron:router

Vivais commented on 8ec7e07 Dec 4, 2017

for windows user:
meteor add iron:router

Please sign in to comment.