fixes based on requested changes

This commit is contained in:
alecmerdler 2017-02-01 00:29:56 -08:00
parent 43f95c52a0
commit 537c07ad4d
11 changed files with 60 additions and 48 deletions

View file

@ -14,4 +14,4 @@ describe("Decorator: Inject", () => {
class ValidService {
constructor(@Inject('$scope') private $scope: any) {}
}
}

View file

@ -5,7 +5,7 @@
*/
export function Inject(value: string) {
return (target: any, propertyKey: string | symbol, parameterIndex: number): void => {
target.$inject = target.$inject || [];
target.$inject = target.$inject = [];
target.$inject[parameterIndex] = value;
}
}