{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular.io/pulls/comments/55880336","id":55880336,"diff_hunk":"@@ -248,45 +242,50 @@ class ProviderComponent9a implements OnInit {\n   */\n \n   // #docregion provider-9a-ctor\n-\n   // @Inject(token) to inject the dependency\n-  ProviderComponent9a(@Inject('app.config') Map config) {\n-    _config = new ConfigImpl(apiEndpoint: config['apiEndpoint'], title: config['title']);\n+  ProviderComponent9a(@Inject(Config) Map config) {\n+//    ProviderComponent9a(@Inject('app.config') Map config) {\n+    _config = new ConfigImpl(\n+        apiEndpoint: config['apiEndpoint'], title: config['title']);\n   }\n-\n   // #enddocregion provider-9a-ctor\n+\n   ngOnInit() {\n     log = '\\'app.config\\' Application title is ' + _config.title;\n   }\n }\n \n-@Component(selector: 'provider-9b', template: '{{log}}', providers:\n-// #docregion providers-9b\n-const [const Provider(APP_CONFIG, useValue: CONFIG_HASH)]) // #enddocregion providers-9b\n-class ProviderComponent9b\n-    implements OnInit {\n+@Component(\n+    selector: 'provider-9b',\n+    template: '{{log}}',\n+    // #docregion providers-9b\n+    providers: const [const Provider(APP_CONFIG, useValue: CONFIG_HASH)]\n+    // . . .\n+    // #enddocregion providers-9b\n+)\n+class ProviderComponent9b implements OnInit {\n   Config _config;","path":"public/docs/_examples/dependency-injection/dart/lib/providers_component.dart","position":294,"original_position":294,"commit_id":"f61c19e233c0337fb92899511e4c9bae829c69ed","original_commit_id":"f61c19e233c0337fb92899511e4c9bae829c69ed","user":{"login":"thso","id":16721021,"avatar_url":"https://avatars.githubusercontent.com/u/16721021?v=3","gravatar_id":"","url":"https://api.github.com/users/thso","html_url":"https://github.com/thso","followers_url":"https://api.github.com/users/thso/followers","following_url":"https://api.github.com/users/thso/following{/other_user}","gists_url":"https://api.github.com/users/thso/gists{/gist_id}","starred_url":"https://api.github.com/users/thso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thso/subscriptions","organizations_url":"https://api.github.com/users/thso/orgs","repos_url":"https://api.github.com/users/thso/repos","events_url":"https://api.github.com/users/thso/events{/privacy}","received_events_url":"https://api.github.com/users/thso/received_events","type":"User","site_admin":false},"body":"final","created_at":"2016-03-11T19:57:55Z","updated_at":"2016-03-11T19:57:55Z","html_url":"https://github.com/angular/angular.io/pull/951#discussion_r55880336","pull_request_url":"https://api.github.com/repos/angular/angular.io/pulls/951","_links":{"self":{"href":"https://api.github.com/repos/angular/angular.io/pulls/comments/55880336"},"html":{"href":"https://github.com/angular/angular.io/pull/951#discussion_r55880336"},"pull_request":{"href":"https://api.github.com/repos/angular/angular.io/pulls/951"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular.io/pulls/951","id":62488243,"html_url":"https://github.com/angular/angular.io/pull/951","diff_url":"https://github.com/angular/angular.io/pull/951.diff","patch_url":"https://github.com/angular/angular.io/pull/951.patch","issue_url":"https://api.github.com/repos/angular/angular.io/issues/951","number":951,"state":"open","locked":false,"title":"[WIP] Dart dependency injection","user":{"login":"kwalrath","id":2164483,"avatar_url":"https://avatars.githubusercontent.com/u/2164483?v=3","gravatar_id":"","url":"https://api.github.com/users/kwalrath","html_url":"https://github.com/kwalrath","followers_url":"https://api.github.com/users/kwalrath/followers","following_url":"https://api.github.com/users/kwalrath/following{/other_user}","gists_url":"https://api.github.com/users/kwalrath/gists{/gist_id}","starred_url":"https://api.github.com/users/kwalrath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwalrath/subscriptions","organizations_url":"https://api.github.com/users/kwalrath/orgs","repos_url":"https://api.github.com/users/kwalrath/repos","events_url":"https://api.github.com/users/kwalrath/events{/privacy}","received_events_url":"https://api.github.com/users/kwalrath/received_events","type":"User","site_admin":false},"body":"@thso please take a look. The jade source is pretty unreadable, so I've sent you a PDF (or you could build it yourself, using this PR). Comment whichever way is easiest for you—only the TS source, on the Dart source, in email... whatever works. Thanks for your time!\r\n\r\nToward the end, it got a bit ugly, since the TS version was talking about very TS/JS-specific stuff, like object hashes and the fact that interfaces don't work as provider tokens. (They do work in Dart! Or at least in Dartium... I'd better check the compiled version.) I'd appreciate any help you can give me in (1) providing good code and (2) coming up with better motivations for using string and opaque tokens.","created_at":"2016-03-11T02:11:05Z","updated_at":"2016-03-11T19:57:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f0680ac28e2b0de3a198188b2490d325d12908d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/angular/angular.io/pulls/951/commits","review_comments_url":"https://api.github.com/repos/angular/angular.io/pulls/951/comments","review_comment_url":"https://api.github.com/repos/angular/angular.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular.io/issues/951/comments","statuses_url":"https://api.github.com/repos/angular/angular.io/statuses/f61c19e233c0337fb92899511e4c9bae829c69ed","head":{"label":"kwalrath:dart-dependency-injection","ref":"dart-dependency-injection","sha":"f61c19e233c0337fb92899511e4c9bae829c69ed","user":{"login":"kwalrath","id":2164483,"avatar_url":"https://avatars.githubusercontent.com/u/2164483?v=3","gravatar_id":"","url":"https://api.github.com/users/kwalrath","html_url":"https://github.com/kwalrath","followers_url":"https://api.github.com/users/kwalrath/followers","following_url":"https://api.github.com/users/kwalrath/following{/other_user}","gists_url":"https://api.github.com/users/kwalrath/gists{/gist_id}","starred_url":"https://api.github.com/users/kwalrath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwalrath/subscriptions","organizations_url":"https://api.github.com/users/kwalrath/orgs","repos_url":"https://api.github.com/users/kwalrath/repos","events_url":"https://api.github.com/users/kwalrath/events{/privacy}","received_events_url":"https://api.github.com/users/kwalrath/received_events","type":"User","site_admin":false},"repo":{"id":46308918,"name":"angular.io","full_name":"kwalrath/angular.io","owner":{"login":"kwalrath","id":2164483,"avatar_url":"https://avatars.githubusercontent.com/u/2164483?v=3","gravatar_id":"","url":"https://api.github.com/users/kwalrath","html_url":"https://github.com/kwalrath","followers_url":"https://api.github.com/users/kwalrath/followers","following_url":"https://api.github.com/users/kwalrath/following{/other_user}","gists_url":"https://api.github.com/users/kwalrath/gists{/gist_id}","starred_url":"https://api.github.com/users/kwalrath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwalrath/subscriptions","organizations_url":"https://api.github.com/users/kwalrath/orgs","repos_url":"https://api.github.com/users/kwalrath/repos","events_url":"https://api.github.com/users/kwalrath/events{/privacy}","received_events_url":"https://api.github.com/users/kwalrath/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kwalrath/angular.io","description":"Website for Angular 2","fork":true,"url":"https://api.github.com/repos/kwalrath/angular.io","forks_url":"https://api.github.com/repos/kwalrath/angular.io/forks","keys_url":"https://api.github.com/repos/kwalrath/angular.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kwalrath/angular.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kwalrath/angular.io/teams","hooks_url":"https://api.github.com/repos/kwalrath/angular.io/hooks","issue_events_url":"https://api.github.com/repos/kwalrath/angular.io/issues/events{/number}","events_url":"https://api.github.com/repos/kwalrath/angular.io/events","assignees_url":"https://api.github.com/repos/kwalrath/angular.io/assignees{/user}","branches_url":"https://api.github.com/repos/kwalrath/angular.io/branches{/branch}","tags_url":"https://api.github.com/repos/kwalrath/angular.io/tags","blobs_url":"https://api.github.com/repos/kwalrath/angular.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kwalrath/angular.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kwalrath/angular.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/kwalrath/angular.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kwalrath/angular.io/statuses/{sha}","languages_url":"https://api.github.com/repos/kwalrath/angular.io/languages","stargazers_url":"https://api.github.com/repos/kwalrath/angular.io/stargazers","contributors_url":"https://api.github.com/repos/kwalrath/angular.io/contributors","subscribers_url":"https://api.github.com/repos/kwalrath/angular.io/subscribers","subscription_url":"https://api.github.com/repos/kwalrath/angular.io/subscription","commits_url":"https://api.github.com/repos/kwalrath/angular.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/kwalrath/angular.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/kwalrath/angular.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/kwalrath/angular.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/kwalrath/angular.io/contents/{+path}","compare_url":"https://api.github.com/repos/kwalrath/angular.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kwalrath/angular.io/merges","archive_url":"https://api.github.com/repos/kwalrath/angular.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kwalrath/angular.io/downloads","issues_url":"https://api.github.com/repos/kwalrath/angular.io/issues{/number}","pulls_url":"https://api.github.com/repos/kwalrath/angular.io/pulls{/number}","milestones_url":"https://api.github.com/repos/kwalrath/angular.io/milestones{/number}","notifications_url":"https://api.github.com/repos/kwalrath/angular.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kwalrath/angular.io/labels{/name}","releases_url":"https://api.github.com/repos/kwalrath/angular.io/releases{/id}","deployments_url":"https://api.github.com/repos/kwalrath/angular.io/deployments","created_at":"2015-11-16T23:07:08Z","updated_at":"2016-01-11T22:27:08Z","pushed_at":"2016-03-11T03:16:31Z","git_url":"git://github.com/kwalrath/angular.io.git","ssh_url":"git@github.com:kwalrath/angular.io.git","clone_url":"https://github.com/kwalrath/angular.io.git","svn_url":"https://github.com/kwalrath/angular.io","homepage":"https://angular.io","size":18033,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"271b64b7e3421dd7570aec23882f171f5e32c09a","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":31985425,"name":"angular.io","full_name":"angular/angular.io","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular.io","description":"Website for Angular 2","fork":false,"url":"https://api.github.com/repos/angular/angular.io","forks_url":"https://api.github.com/repos/angular/angular.io/forks","keys_url":"https://api.github.com/repos/angular/angular.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular.io/teams","hooks_url":"https://api.github.com/repos/angular/angular.io/hooks","issue_events_url":"https://api.github.com/repos/angular/angular.io/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular.io/events","assignees_url":"https://api.github.com/repos/angular/angular.io/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular.io/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular.io/tags","blobs_url":"https://api.github.com/repos/angular/angular.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular.io/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular.io/languages","stargazers_url":"https://api.github.com/repos/angular/angular.io/stargazers","contributors_url":"https://api.github.com/repos/angular/angular.io/contributors","subscribers_url":"https://api.github.com/repos/angular/angular.io/subscribers","subscription_url":"https://api.github.com/repos/angular/angular.io/subscription","commits_url":"https://api.github.com/repos/angular/angular.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular.io/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular.io/merges","archive_url":"https://api.github.com/repos/angular/angular.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular.io/downloads","issues_url":"https://api.github.com/repos/angular/angular.io/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular.io/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular.io/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular.io/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular.io/releases{/id}","deployments_url":"https://api.github.com/repos/angular/angular.io/deployments","created_at":"2015-03-10T22:32:34Z","updated_at":"2016-03-09T23:03:02Z","pushed_at":"2016-03-11T19:34:00Z","git_url":"git://github.com/angular/angular.io.git","ssh_url":"git@github.com:angular/angular.io.git","clone_url":"https://github.com/angular/angular.io.git","svn_url":"https://github.com/angular/angular.io","homepage":"https://angular.io","size":23612,"stargazers_count":279,"watchers_count":279,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":314,"mirror_url":null,"open_issues_count":42,"forks":314,"open_issues":42,"watchers":279,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular.io/pulls/951"},"html":{"href":"https://github.com/angular/angular.io/pull/951"},"issue":{"href":"https://api.github.com/repos/angular/angular.io/issues/951"},"comments":{"href":"https://api.github.com/repos/angular/angular.io/issues/951/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular.io/pulls/951/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular.io/pulls/951/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular.io/statuses/f61c19e233c0337fb92899511e4c9bae829c69ed"}}}}