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

Commit 841db9e

Browse files
chalinkwalrath
authored andcommitted
docs(toh-6): show provider to use with a real back end (#2059)
Fixes #2055.
1 parent 5ce8304 commit 841db9e

File tree

1 file changed

+5
-2
lines changed
  • public/docs/_examples/toh-6/dart/web

1 file changed

+5
-2
lines changed

public/docs/_examples/toh-6/dart/web/main.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import 'package:angular2_tour_of_heroes/in_memory_data_service.dart';
1010

1111
void main() {
1212
bootstrap(AppComponent,
13-
const [const Provider(Client, useClass: InMemoryDataService)]);
13+
[provide(Client, useClass: InMemoryDataService)]
14+
// Using a real back end? Import browser_client.dart and change the above to
15+
// [provide(Client, useFactory: () => new BrowserClient(), deps: [])]
16+
);
1417
}
1518
// #enddocregion final
1619
/*
@@ -23,7 +26,7 @@ void main() {
2326
]);
2427
// Simplify bootstrap provider list to [BrowserClient]
2528
// once there is a fix for:
26-
// https://github.com/angular/angular/issues/9673
29+
// https://github.com/dart-lang/angular2/issues/37
2730
}
2831
// #enddocregion v1
2932
*/

0 commit comments

Comments
 (0)