Where do I put iron-router code?
-
20-12-2019 - |
Question
Where am I supposed to put
Router.map(function(){
this.route(name:String, options:Object);
});
and all other iron-router code with meteor? In the main.html file?
Solution
You can have a look at the unofficial-meteor-faq for some file organization ideas. It should be under the client
directory - e.g. client/lib/routes.js
, but there isn't a strict rule about where it should go.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow