You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix($InjectorLike) Optional generic type support (#3068)
When working with Typescript, you currently need to do something like this to set type correctly:
```typescript
$urlRouterProvider.otherwise(($injector) => {
let myService: MyService = $injector.get('myService');
myService.doSomething();
});
```
With this change, you could instead write the above like this:
```typescript
$urlRouterProvider.otherwise(($injector) => {
$injector
.get<MyService>('myService')
.doSomething();
});
```
0 commit comments