Search code examples
javascriptmeteoriron-routermeteorite

Meteor JS: Iron router on click button


I have this code

Template.home.events 'click .buy': (event) ->
  event.preventDefault()
  ???
  return

After the user click the button (buy) I want it will go to a router path /product. What shall I add in my code?


Solution

  • you can try :

    Router.go('/yoururl');
    

    Relevant entry in the Iron router guide