New Dart prose, update Dart and Ts code + guide/server-communication/ts: update to docs and example code + guide/server-communication/dart: new prose, update example code + ignore all npm-debug.logs + make Jade ul li TOC elements more compact.
16 lines
452 B
Dart
16 lines
452 B
Dart
// #docregion
|
|
import 'package:http/browser_client.dart';
|
|
import 'package:http_in_memory_web_api/http_in_memory_web_api.dart';
|
|
|
|
CreateDb createDb = () => {
|
|
'heroes': [
|
|
{"id": "1", "name": "Windstorm"},
|
|
{"id": "2", "name": "Bombasto"},
|
|
{"id": "3", "name": "Magneta"},
|
|
{"id": "4", "name": "Tornado"}
|
|
]
|
|
};
|
|
|
|
BrowserClient HttpClientBackendServiceFactory() =>
|
|
new HttpClientInMemoryBackendService(createDb);
|