title: Ionic 2 - Services unexpected token error
body: <p>I am trying to use an Injectable in my code in an Ionic 2 app and I get this error.</p>
  
  <p>Module build failed: SyntaxError: /home.js: Unexpected token (10:25)</p>
  
  <pre><code>export class HomePage {
  constructor(myservice: WpService) {
                       ^
           this.service = myservice;
          this.data = null;
       }
  </code></pre>
  
  <p>This is my code: (home.js file).</p>
  
  <pre><code>import {Page} from 'ionic-framework/ionic';
  import {WpService} from './wpservice';
  
  @Page({
    templateUrl: 'build/pages/home/home.html',
      providers: [WpService]
  })
  export class HomePage {
      constructor(myservice: WpService) {
          this.service = myservice;
          this.data = null;
      }
  
      retrieve() {
          this.service.loadData();
          setTimeout(() =&gt; {
              this.data = this.service.getData();
              console.log(this.data);
          }, 5000);
      }
  }
  </code></pre>
  
  <p>and this is the wpservice file:</p>
  
  <pre><code>import {Injectable} from 'angular2/core';
  import {Http} from 'angular2/http';
  import 'rxjs/Rx'
  
  @Injectable
  export class WpService {
      constructor(http: Http) {
          this.http = http;
          this.data = null;
      }
  
      loadData() {
          this.http.get('&lt;some rest api&gt;').subscribe(data =&gt; {
              this.data = data.json() 
          });
          }
  
      getData() {
          return this.data;
      }
      }
  </code></pre>
  
  <p>Strangely this error is occurring only from feb 26 evening. Before that it was working fine. </p>