1

Like:

@Injectable()
class ApiService {
  Future<T> fetch<T>(String path) {
    ...
  }
}

this doesn't seem to work

Jonathan
  • 4,724
  • 7
  • 45
  • 65

2 Answers2

4

Seems this was fixed very recently and is probably not yet included in the latest 3.0.0-alpha+1

https://github.com/dart-lang/angular2/issues/266

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
1

It seems that it was fixed within the analyzer package 0.29:

https://github.com/dart-lang/sdk/blob/master/pkg/analyzer/CHANGELOG.md

However, if you do:

T aa<T>() { 
  print(T.toString());
}

you will get a "dynamic" instead of the original class, which, very unfortunately, doesn't help me

Jonathan
  • 4,724
  • 7
  • 45
  • 65