import {Inject, Injectable} from 'ng-forward';
import MyService from './my-service';
@Injectable()
class AnotherService{
constructor(
@Inject('$http') private $http: angular.IHttp,
private myService: MyService
){ }
}
This would add behavior to the @Inject decorator to support parameters in the constructor. It would not break existing @Inject functionality. We would also need to change the Module class to support reading design:type metadata when looking for $inject metadata on a provider.
Support this type of injection:
This would add behavior to the
@Inject
decorator to support parameters in the constructor. It would not break existing@Inject
functionality. We would also need to change theModule
class to support readingdesign:type
metadata when looking for$inject
metadata on a provider.