2

I am using yeoman angular-fullstack boilerplate.

'use strict';

class SignupController {
    // Logic for signup.
}

angular.module('myApp')
  .controller('SignupController', SignupController);

How can i do dependency injection for particular controller ?

Jay
  • 1,575
  • 1
  • 17
  • 22
  • 2
    Possible duplicate of [How to $inject into Angular class w/ES6](http://stackoverflow.com/questions/31627753/how-to-inject-into-angular-class-w-es6) – krl Jan 18 '16 at 07:21

1 Answers1

3

The angular-fullstack generator seems to include ng-annotate which generates the injection code for you. You might be able to do something like:

class Service {
  /* @ngInject */
  constructor($scope, $state) {

  }
}
kuhnroyal
  • 7,188
  • 1
  • 34
  • 47