Linus
Linus

Reputation: 948

Meteor: Force re-rendering of nested template

In my meteor application I have some forms to insert new posts. I render each form as its own template to keep everything clean.

I want to be able to reset the form as simple as possible.

These forms have a lot of bells and whistles and I want to avoid a lot of DOM-traversing and resetting of values.

So is there a way to render the whole nested template for the form again?

That way I would get the initial state of the form without much hassle.

Upvotes: 3

Views: 3269

Answers (1)

Nick Lammertyn
Nick Lammertyn

Reputation: 396

Sure it's possible, you can call Blaze.remove() and subsequently call Blaze.render() or Blaze.renderWithData() manually.

In the docs: http://docs.meteor.com/#/full/blaze_remove

Upvotes: 6

Related Questions