From 841db9e817642cc80c50756a9a7807461ccc40c6 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Tue, 9 Aug 2016 10:41:05 -0700 Subject: [PATCH] docs(toh-6): show provider to use with a real back end (#2059) Fixes #2055. --- public/docs/_examples/toh-6/dart/web/main.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/docs/_examples/toh-6/dart/web/main.dart b/public/docs/_examples/toh-6/dart/web/main.dart index 1075856c61..ff344d1a54 100644 --- a/public/docs/_examples/toh-6/dart/web/main.dart +++ b/public/docs/_examples/toh-6/dart/web/main.dart @@ -10,7 +10,10 @@ import 'package:angular2_tour_of_heroes/in_memory_data_service.dart'; void main() { bootstrap(AppComponent, - const [const Provider(Client, useClass: InMemoryDataService)]); + [provide(Client, useClass: InMemoryDataService)] + // Using a real back end? Import browser_client.dart and change the above to + // [provide(Client, useFactory: () => new BrowserClient(), deps: [])] + ); } // #enddocregion final /* @@ -23,7 +26,7 @@ void main() { ]); // Simplify bootstrap provider list to [BrowserClient] // once there is a fix for: - // https://github.com/angular/angular/issues/9673 + // https://github.com/dart-lang/angular2/issues/37 } // #enddocregion v1 */