docs(toh-6): show provider to use with a real back end (#2059)

Fixes #2055.
This commit is contained in:
Patrice Chalin 2016-08-09 10:41:05 -07:00 committed by Kathy Walrath
parent 5ce8304227
commit 841db9e817

View File

@ -10,7 +10,10 @@ import 'package:angular2_tour_of_heroes/in_memory_data_service.dart';
void main() { void main() {
bootstrap(AppComponent, 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 // #enddocregion final
/* /*
@ -23,7 +26,7 @@ void main() {
]); ]);
// Simplify bootstrap provider list to [BrowserClient] // Simplify bootstrap provider list to [BrowserClient]
// once there is a fix for: // once there is a fix for:
// https://github.com/angular/angular/issues/9673 // https://github.com/dart-lang/angular2/issues/37
} }
// #enddocregion v1 // #enddocregion v1
*/ */