Open gerwinbrunner opened 9 years ago
Meteor device detection only does automatic template redirection when used with the meteor-router project. I haven't made a binding to hook into the iron router rendering process.
You should be able to do this automatically by adding {{> deviceRender 'template_name_here'}}
into the template rendered by iron-router.
I would also accept a pull request which added iron-router support.
Thanks for your reply. I could look into adding the iron-router support. Could you please direct me to where you see the best place to add this in the device-defection code.
It probably makes sense to add it into a separate file, like the device_helpers.js
file. Possibly device_ironrouter.js
or similar. I haven't looked into what is necessary at all, so I am not sure.
Just submitted a pull request. It was a pretty simple fix. It would be great if someone can test other devices other than phone and desktop/web.
Cheers!
Any chance this pull request is going to get... pulled?
:+1:
Hi,
is there a way to use meteor-device-detection with iron router? It does not seem to pick up "_phone" templates automatically. Is there a way to get this working?
Thanks, Gerwin