# Capture drag on mobile or mouse move events on pc

**URL:** <https://forum.ionicframework.com/t/capture-drag-on-mobile-or-mouse-move-events-on-pc/48366>\
**Category:** ionic-v3\
**Created:** [April 4, 2016, 6:15pm UTC](https://forum.ionicframework.com/t/capture-drag-on-mobile-or-mouse-move-events-on-pc/48366 "2016-04-04T18:15:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gentunian](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gentunian/32/99147_2.png) [@gentunian](https://forum.ionicframework.com/u/gentunian)\
**Post date:** [April 4, 2016, 6:15pm UTC](https://forum.ionicframework.com/t/capture-drag-on-mobile-or-mouse-move-events-on-pc/48366/1 "2016-04-04T18:15:32Z")

</div>

I’m building an application that connects to my smart TV in order to remote control it.

I just want to add an area where you can move your mouse (or move your finger) that updates the pointer coordinates in the TV.

I can’t find anything related to it with ionic 2. Any clues where to read documentation about it?

Best,

---

<div class="post-metadata">

**Author:** ![xr0master](https://avatars.discourse-cdn.com/v4/letter/x/b4bc9f/32.png) [@xr0master](https://forum.ionicframework.com/u/xr0master)\
**Post date:** [April 4, 2016, 6:39pm UTC](https://forum.ionicframework.com/t/capture-drag-on-mobile-or-mouse-move-events-on-pc/48366/2 "2016-04-04T18:39:14Z")

</div>

What is question? Get the move coordinates? Move event returns the event object with coordinates.

---

<div class="post-metadata">

**Author:** ![gentunian](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gentunian/32/99147_2.png) [@gentunian](https://forum.ionicframework.com/u/gentunian)\
**Post date:** [April 4, 2016, 6:46pm UTC](https://forum.ionicframework.com/t/capture-drag-on-mobile-or-mouse-move-events-on-pc/48366/3 "2016-04-04T18:46:25Z")

</div>

Hey @xr0master, sry If I didn’t explain myself.

In the `Events` doc I can’t find anything related to mouse events or any other event: [http://ionicframework.com/docs/v2/api/util/Events/](http://ionicframework.com/docs/v2/api/util/Events/)

So, it’s not clear for me to which kind of event I need to subscribe in order to get touch/move coordinates.

---

<div class="post-metadata">

**Author:** ![xr0master](https://avatars.discourse-cdn.com/v4/letter/x/b4bc9f/32.png) [@xr0master](https://forum.ionicframework.com/u/xr0master)\
**Post date:** [April 4, 2016, 6:58pm UTC](https://forum.ionicframework.com/t/capture-drag-on-mobile-or-mouse-move-events-on-pc/48366/4 "2016-04-04T18:58:28Z")

</div>

Ah )  
Events there are EventEmitter. You no need it. You need use just the javascript events.  
Something…

```auto
<div (move)="somethingMoved($event)"></div>

```

```auto
@Component(...)
class MyComponent {
  somethingMoved(event) {
    console.log(event);
  }
}

```

Update: Fixed my terrible English

---

<div class="post-metadata">

**Author:** ![gentunian](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gentunian/32/99147_2.png) [@gentunian](https://forum.ionicframework.com/u/gentunian)\
**Post date:** [April 4, 2016, 7:25pm UTC](https://forum.ionicframework.com/t/capture-drag-on-mobile-or-mouse-move-events-on-pc/48366/5 "2016-04-04T19:25:20Z")

</div>

Thanks for the reply 🙂

That didn’t worked. It works for `(click)` but it is not working for `(move)`

```
@Component({
  selector: 'tv-area',
  template: '<div (move)="test($event)" style="background-color: red;">foobar</div>'
})
export class TvAreaComponent {
  constructor() {}

  test(event) {
    console.log(event);
  }
}
```

---

<div class="post-metadata">

**Author:** ![xr0master](https://avatars.discourse-cdn.com/v4/letter/x/b4bc9f/32.png) [@xr0master](https://forum.ionicframework.com/u/xr0master)\
**Post date:** [April 4, 2016, 7:34pm UTC](https://forum.ionicframework.com/t/capture-drag-on-mobile-or-mouse-move-events-on-pc/48366/6 "2016-04-04T19:34:34Z")

</div>

I made a mistake.

> mousemove

---

<div class="post-metadata">

**Author:** ![gentunian](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gentunian/32/99147_2.png) [@gentunian](https://forum.ionicframework.com/u/gentunian)\
**Post date:** [April 4, 2016, 7:40pm UTC](https://forum.ionicframework.com/t/capture-drag-on-mobile-or-mouse-move-events-on-pc/48366/7 "2016-04-04T19:40:24Z")

</div>

Uffff… now I understand what you meant at the beggining… I was thinking off the window…

This has to do with angular 2 managing events and not ionic. Sry, my bad when I got confused with `Events` api.

Thanks,

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [April 5, 2016, 6:31pm UTC](https://forum.ionicframework.com/t/capture-drag-on-mobile-or-mouse-move-events-on-pc/48366/8 "2016-04-05T18:31:35Z")

</div>

Hey just wanted to chime in on this a bit.

So if you wanted to bind to an event in angular to, all you need to do is use the `(eventName)`
