These are chat archives for AngularClass/NG6-starter

17th
Jan 2016
Andrew Lombardi
@kinabalu
Jan 17 2016 05:00
hey everyone, not sure what’s wrong here but I have a controller which I inject a service myService into, and in the template there’s a call to it each time a key is pressed (for autocomplete), but the service is undefined when calling it, not sure why?
class MyController {
  constructor(myService) {
    "ngInject";
    this.myService = myService;
    this.name = 'my';
  }

  update(typed) {
    console.log(this.myService);
  }
}

export default MyController;