Is there any prior art/literature around how to deal with touch events on mobile in an emberjs app?
The most common one is a tap
event but I cant find anything which discusses it in the context of an emberjs application.
Can using jquery just work? There is jquery mobile as well but I am concerned integrating that with ember might open a different can of worms.
Ember has support for touchEvents but then one still has to do work to simulate a tap
, swipe
or pinch
event for instance.
Thoughts? How are people doing mobile apps using Emberjs?
You should check out ember-hammertime and ember-gestures as examples of some community approaches. Also look for 'touch' on ember-observer
You have to think of everything as touch now, it's not really a mobile app issue anymore.
Just use closure actions. Generally I would not rely on jQuery events.
However I don't think tap
is a real event.
Well, most devices trigger onclick
when you tap. But you can attach any event:
<div ontouchstart={{action 'foo'}}>foo</foo>
If you want to do more complex things consider to build a component for it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With