tmeasday / meteor-router

MIT License
366 stars 76 forks source link

re-renders everything on url change #5

Closed cj closed 12 years ago

cj commented 12 years ago

Hi,

First of thank you for this, it's working great bar this oen issue. I have:

<head>
  <title>Some Site</title>
</head>

<body>
  <div id="content-wrapper">
    <div id="container">
      {{>layouts-_header}}
      <div id="main" class="round_8 clearfix">
        {{{render currentPage}}}
      </div>
    </div>
  </div>
</body>

I would expect it to just update the contents of #main but it seems to be re-rendering everything when you go to a different url. Is it meant to be this way?

Many thanks

cj commented 12 years ago

For now I created my own simple routing which works great https://gist.github.com/c5cdeacccdcd568ae5d0 but I'd love to know if yours is working as intended.

tmeasday commented 12 years ago

You can achieve what you want by just putting the {{{render currentPage}}} in it's own template, or wrapping it in an {{#isolate}}..{{/isolate}} block.

cj commented 12 years ago

@tmeasday Ah that makes perfect sense. Thank you, it's been a long day :)