Example TODOS with FlowRouter


#1

Hi,

i wanted to know if someone had updated the “todos” sample with FlowRouter instead of IronRouter.
We can read on lot of blogs that FlowRouter is what would be a router for meteor, so i’m interested in using official examples with FR.

I tried today to remove IronRouter and use FlowRouter, but i’m facing a lot of problems or rendering and data context.
here is the repo : https://github.com/MeteorLyon/meteor-todos
and a sumup of the changes : https://github.com/MeteorLyon/meteor-todos/commit/3529d44175ec70d86454cc3957c9998a70103fd7

Any help is welcome, i would like to present this on my next meetup.
Thanks


#2

Ok, so now it works.
The main problem is how to design the layout with FlowRouter. Here the layout is still appBody with only one Template.dynamic. This way i’ve been obliged to create a new Template that does what previous yield did in IronRouter. But it’s the only way i found to succeed.

Maybe i should refactor all the layout to get a menu and a mainContainer. And this new Layout might be cleaner that what i did here.