Skip to content

Commit 8ec7e07

Browse files
committedOct 19, 2015
Very basic routing.
chapter5-1
1 parent 7b26a11 commit 8ec7e07

File tree

5 files changed

+26
-12
lines changed

5 files changed

+26
-12
lines changed
 

‎.meteor/packages

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ ecmascript # Enable ECMAScript2015+ syntax in app code
1919
insecure # Allow all DB writes from clients (for prototyping)
2020
twbs:bootstrap
2121
underscore
22+
iron:router@1.0.0-rc.1

‎.meteor/versions

+8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ htmljs@1.0.5
2929
http@1.1.1
3030
id-map@1.0.4
3131
insecure@1.0.4
32+
iron:controller@1.0.12
33+
iron:core@1.0.11
34+
iron:dynamic-template@1.0.12
35+
iron:layout@1.0.12
36+
iron:location@1.0.11
37+
iron:middleware-stack@1.0.11
38+
iron:router@1.0.12
39+
iron:url@1.0.11
3240
jquery@1.11.4
3341
launch-screen@1.0.4
3442
livedata@1.0.15

‎client/main.html

-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
11
<head>
22
<title>Microscope</title>
33
</head>
4-
<body>
5-
<div class="container">
6-
<header class="navbar navbar-default" role="navigation">
7-
<div class="navbar-header">
8-
<a class="navbar-brand" href="/">Microscope</a>
9-
</div>
10-
</header>
11-
<div id="main">
12-
{{> postsList}}
13-
</div>
14-
</div>
15-
</body>
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<template name="layout">
2+
<div class="container">
3+
<header class="navbar navbar-default" role="navigation">
4+
<div class="navbar-header">
5+
<a class="navbar-brand" href="{{pathFor 'postsList'}}">Microscope</a>
6+
</div>
7+
</header>
8+
<div id="main">
9+
{{> yield}}
10+
</div>
11+
</div>
12+
</template>

‎lib/router.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Router.configure({
2+
layoutTemplate: 'layout'
3+
});
4+
5+
Router.route('/', {name: 'postsList'});

1 commit comments

Comments
 (1)

Vivais commented on Dec 4, 2017

@Vivais

for windows user:
meteor add iron:router

Please sign in to comment.