docs(toh-6): show provider to use with a real back end (#2059)
Fixes #2055.
This commit is contained in:
parent
5ce8304227
commit
841db9e817
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue