Reputation: 646
I've seen two forms that basically seem to do the same thing, given a template called 'index'. What are the differences between them?
First:
Router.route('index', {
path: '/'
});
Second:
Router.route('/', function(){
this.render('index');
});
Upvotes: 1
Views: 27
Reputation: 5088
In this case there's probably no difference. It's two ways to do the same thing. It's a question of syntax. The first syntax is clearly simpler in this case though.
There might be other cases where there are certain things you can do with one syntax that you can't do with the other syntax, but I don't remember an example off the top of my head.
Upvotes: 1