Patrice Chalin c1440e7eff [review-pending] docs(dev guide): server-communication - new prose
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.
2016-05-13 21:32:54 +01:00

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);