Index: example/angular/routing/accessing_router_in_controller/main.dart |
diff --git a/example/angular/routing/accessing_router_in_controller/main.dart b/example/angular/routing/accessing_router_in_controller/main.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..176e0c6d265ce4d23e2971cc585c3047d7449bb7 |
--- /dev/null |
+++ b/example/angular/routing/accessing_router_in_controller/main.dart |
@@ -0,0 +1,21 @@ |
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+import 'package:angular/angular.dart'; |
+import 'my_router.dart' show MyRouteInitializer; |
+import 'my_controller.dart' show MyController; |
+ |
+ |
+class MyAppModule extends Module { |
+ MyAppModule() { |
+ type(MyController); |
+ type(RouteInitializer, implementedBy: MyRouteInitializer); |
+ factory(NgRoutingUsePushState, |
+ (_) => new NgRoutingUsePushState.value(false)); |
+ } |
+} |
+ |
+main() { |
+ ngBootstrap(module: new MyAppModule()); |
+} |