Jonathan Jonathan -4 years ago 169
Dart Question

Can I have a generic method in a injectable class?

Like:

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


this doesn't seem to work

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download