Skip to content

Commit

Permalink
Very basic routing.
Browse files Browse the repository at this point in the history
chapter5-1
  • Loading branch information
tmeasday committed Oct 19, 2015
1 parent 7b26a11 commit 8ec7e07
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
1 change: 1 addition & 0 deletions .meteor/packages
Expand Up @@ -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
8 changes: 8 additions & 0 deletions .meteor/versions
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions client/main.html
@@ -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>
12 changes: 12 additions & 0 deletions client/templates/application/layout.html
@@ -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>
5 changes: 5 additions & 0 deletions lib/router.js
@@ -0,0 +1,5 @@
Router.configure({
layoutTemplate: 'layout'
});

Router.route('/', {name: 'postsList'});

1 comment on commit 8ec7e07

@Vivais
Copy link

@Vivais Vivais commented on 8ec7e07 Dec 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for windows user:
meteor add iron:router

Please sign in to comment.