Using mobile events in Angular2
<p>I was wondering if I could get some help in regards to events for mobile devices. I was looking around for a way to bind functions to swipe events in Angular 2. I saw in this <a href="https://github.com/angular/angular/issues/6549" rel="noreferrer">this issue</a> on Github that mentions that Angular 2 uses Hammer.js for mobile event handling.</p>

<p>I'm having some trouble getting the event to work because I get the following error: </p>

<blockquote>
  <p>EXCEPTION: Hammer.js is not loaded, can not bind swipeleft event</p>
</blockquote>

<p>A snippet of my code is below:</p>

<pre><code>import {Component, View, AfterContentInit} from 'angular2/core';
import {HelperService} from "./helper-service";
import {HammerGesturesPluginCommon} from 'angular2/src/platform/dom/events/hammer_common'

@View({
  template: `&lt;div [id]="middleCircle" (swipeleft)="doThis()"&gt;&lt;/div&gt;`
})

export class ColumnDirective implements AfterContentInit {
  constructor(private helperService:HelperService) {}
  doThis(){
     console.log('This thing has been done.');
   }
 }
</code></pre>

<p>If I add in Hammer Gestures to my constructor, I get this error:</p>

<pre><code>constructor(private helperService:HelperService, private hammerGesturesPluginCommon: HammerGesturesPluginCommon) {}
</code></pre>

<blockquote>
  <p>EXCEPTION: No provider for t! (ColumnDirective -> t)</p>
</blockquote>

<p>Any help with this issue would be appreciated!</p>