1

I am new to iron router and looking for a route equivalent of angular ui.router 'otherwise'. I was not able to find it in the documentation. What I need is, if I define the routes as:

Router.route('/', function(){
        this.render('home');
});

Router.route('/signin', function(){
        this.render('signin');
});

If anyone types a url other that '/' or '/signin' it should be redirected to default '/' url. Something which is done by

$urlRouterProvider.otherwise('/'); in angular.

Thanks

user780092
  • 115
  • 4
  • 12
  • http://stackoverflow.com/questions/27788321/meteor-infinite-redirect-instead-of-render-404/27790687#27790687 – sdooo Dec 21 '15 at 11:14

1 Answers1

0

You have to create a route that match all routes except the defined ones. Check this post: https://forums.meteor.com/t/how-do-i-redirect-all-non-existent-routes-in-iron-router/8556

perusopersonale
  • 896
  • 1
  • 8
  • 18