Meteor Routing Returns "[Object Object]"

I am currently reviewing the Discover Meteor book and got an unexpected result that is different from the result the book suggests.

Immediately after installing the iron router, I followed the book and connected router.js

with layout.html

, but instead get [object Object]

messages instead.

my code:

layout.html

<template name="layout">
  <div class="container">
    <header class="navbar">
      <div class="navbar-inner">
        <a class="brand" href="{{pathFor 'postsList'}}">Microscope</a>
      </div>
    </header>
    <div id="main" class="row-fluid">
      {{yield}}
    </div>
  </div>
</template>

      

router.js

Router.configure({
  layoutTemplate: 'layout'
});

Router.map(function() {
  this.route('postsList', {path: '/'});
});

      

+3
javascript meteor


source to share


No one has answered this question yet

Check out similar questions:

5722
How can I remove a property from a JavaScript object?
5129
How do I return a response from an asynchronous call?
5101
What's the most efficient way to deeply clone an object in JavaScript?
3714
How to check if an array contains a value in JavaScript?
2886
How do I clone a JavaScript object correctly?
2812
event.preventDefault () vs. return false
2709
Detecting object property undefined
2685
Checking if a key exists in a JavaScript object?
2543
How can I check if an object is an array?
2350
Storing objects in HTML5 localStorage



All Articles
Loading...
X
Show
Funny
Dev
Pics