How to add menus/ subtopics for meteor site?

70 views Asked by At

I am new to meteor. I followed the tutorials and successfully making simple interfaces like below. I tried finding examples to add menus/ subtopics like this which does not reload the page when clicked, but I couldn't find any examples. Could you please give me an example how to do this?

in simple-todos.html

<head>
  <title>Todo List</title>
</head>
<body>
  <div class="container">
    <header>
      <h1>Todo List</h1>
    </header>
    <ul>
      {{#each tasks}}
        {{> task}}
      {{/each}}
    </ul>
  </div>
</body>

<template name="task">
  <li>{{text}}</li>
</template>

in simple-todos.js

if (Meteor.isClient) {
  // This code only runs on the client
  Template.body.helpers({
    tasks: [
      { text: "This is task 1" },
      { text: "This is task 2" },
      { text: "This is task 3" }
    ]
  });
}
2

There are 2 answers

0
Firdaus Ramlan On BEST ANSWER

You can achieve it by using IronRouter (Guide) or FlowRouter package.

0
Mohsin Rafi On

Yes, you can achieve this functionality using meteor-useraccounts package. Here is live example of this package.

You can go through its complete documentation for your understanding.