Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit ee4a448

Browse files
committed
fix(example): Adjust MirrorsUsed to make the Todo example work thru dart2js
1 parent 513b212 commit ee4a448

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

example/web/todo.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ import 'dart:html';
1111
//
1212
// If you create classes that are referenced from the Angular
1313
// expressions, you must include a library target in @MirrorsUsed.
14-
@MirrorsUsed(override: '*')
14+
@MirrorsUsed(
15+
targets: const [ 'Item' ],
16+
override: '*')
1517
import 'dart:mirrors';
1618

1719
class Item {
@@ -39,13 +41,15 @@ abstract class ServerController {
3941

4042

4143
// An implementation of ServerController that does nothing.
44+
@NgInjectableService()
4245
class NoServerController implements ServerController {
4346
init(TodoController todo) { }
4447
}
4548

4649

4750
// An implementation of ServerController that fetches items from
4851
// the server over HTTP.
52+
@NgInjectableService()
4953
class HttpServerController implements ServerController {
5054
final Http _http;
5155
HttpServerController(this._http);

0 commit comments

Comments
 (0)