Mayur Patel
Mayur Patel

Reputation: 1751

How to use meteor iron:router to redirect from one page to another?

I have created one website in Meteor and i have created two html file default.html and home.html then how to redirect from default.html page to home.html page?

Upvotes: 0

Views: 629

Answers (1)

Eduardo C. K. Ferreira
Eduardo C. K. Ferreira

Reputation: 374

Is there any special conditions to make it happen? Otherwise, as I could understand from your question, something like this would work:

Router.route('/default', function(){ 
    this.redirect('/home') 
}, {name: 'default'});

When /default is opened, it redirects to the /home URL. You can also add some conditions to it.

Upvotes: 1

Related Questions