| OLD | NEW |
| 1 import 'package:di/di.dart'; | 1 import 'package:di/di.dart'; |
| 2 import 'package:angular/angular.dart'; | 2 import 'package:angular/angular.dart'; |
| 3 import 'package:angular/playback/playback_http.dart'; | 3 import 'package:angular/playback/playback_http.dart'; |
| 4 import 'todo.dart'; | 4 import 'todo.dart'; |
| 5 | 5 |
| 6 import 'dart:html'; | 6 import 'dart:html'; |
| 7 | 7 |
| 8 // Everything in the 'todo' library should be preserved by MirrorsUsed |
| 9 @MirrorsUsed( |
| 10 targets: const['todo'], |
| 11 override: '*') |
| 12 import 'dart:mirrors'; |
| 13 |
| 8 main() { | 14 main() { |
| 9 | 15 |
| 10 print(window.location.search); | 16 print(window.location.search); |
| 11 var module = new Module() | 17 var module = new Module() |
| 12 ..type(TodoController) | 18 ..type(TodoController) |
| 13 ..type(PlaybackHttpBackendConfig); | 19 ..type(PlaybackHttpBackendConfig); |
| 14 | 20 |
| 15 // If these is a query in the URL, use the server-backed | 21 // If these is a query in the URL, use the server-backed |
| 16 // TodoController. Otherwise, use the stored-data controller. | 22 // TodoController. Otherwise, use the stored-data controller. |
| 17 var query = window.location.search; | 23 var query = window.location.search; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 28 module.type(HttpBackend, implementedBy: RecordingHttpBackend); | 34 module.type(HttpBackend, implementedBy: RecordingHttpBackend); |
| 29 } | 35 } |
| 30 | 36 |
| 31 if (query == '?playback') { | 37 if (query == '?playback') { |
| 32 print('Using playback HttpBackend'); | 38 print('Using playback HttpBackend'); |
| 33 module.type(HttpBackend, implementedBy: PlaybackHttpBackend); | 39 module.type(HttpBackend, implementedBy: PlaybackHttpBackend); |
| 34 } | 40 } |
| 35 | 41 |
| 36 ngBootstrap(module:module); | 42 ngBootstrap(module:module); |
| 37 } | 43 } |
| OLD | NEW |