meteor-device-detection icon indicating copy to clipboard operation
meteor-device-detection copied to clipboard

Iron-Router support

Open gerwinbrunner opened this issue 11 years ago • 6 comments

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

gerwinbrunner avatar Jul 21 '14 19:07 gerwinbrunner

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.

mystor avatar Jul 22 '14 19:07 mystor

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.

gerwinbrunner avatar Jul 25 '14 14:07 gerwinbrunner

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.

mystor avatar Jul 25 '14 17:07 mystor

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!

justindra avatar Mar 31 '15 15:03 justindra

Any chance this pull request is going to get... pulled?

t3db0t avatar Jun 29 '15 15:06 t3db0t

:+1:

CarlQLange avatar Oct 31 '15 10:10 CarlQLange