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
{{ message }}
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
Alternatives to OpaqueToken for use in dependency-injection (DI) chapter #1563
OpaqueToken cannot be implemented in Dart, see angulardart/angular#35. I am opening this issue to hold a thread of discussion about alternatives for both the Dart and TS sides --- given that we want minimize difference across languages so as to provide a consistent UX. I'll focus the discussion on Dart, but the proposal holds for both.
For the purpose of this discussion, let's reuse the example given in the TS OpaqueToken section of the angular.io di chapter. Consider the following snippets of a Dart version of that example:
Activity
chalin commentedon Jun 1, 2016
Btw, another alternative to using an abstract class type name is to use a named function (closure) as a token.
chalin commentedon Dec 16, 2016
This issue was moved to dart-lang/site-webdev#256