Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions public/docs/_examples/toh-6/dart/web/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
/*
Expand All @@ -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
*/