Skip to content

Support TypeScript-style Parameter Decorators for DI #102

@MikeRyanDev

Description

@MikeRyanDev

Support this type of injection:

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions