fixes based on requested changes
This commit is contained in:
parent
43f95c52a0
commit
537c07ad4d
11 changed files with 60 additions and 48 deletions
|
@ -14,4 +14,4 @@ describe("Decorator: Inject", () => {
|
|||
|
||||
class ValidService {
|
||||
constructor(@Inject('$scope') private $scope: any) {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue