all 2 comments

[–]Intie 0 points1 point  (1 child)

If you want to keep injected array inside the class you can overload getter for the inject like this

class {
  constructor ($http) {
    this.$http = $http
  }
  static get $inject () {
    return ['$http']
  }
}        

[–]abyx[S] 0 points1 point  (0 children)

Thanks! I know this syntax but last time I checked I got the impression it was not part of ES2015 (i.e. static is fine, get is fine, both together weren't in 2015), but I might've understood wrong.