Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(920)

Unified Diff: example/angular/routing/redirecting_to_a_new_route/my_router.dart

Issue 135183008: First group of routing examples (Closed) Base URL: https://github.com/dart-lang/dart_by_example.git@master
Patch Set: Tweaks Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: example/angular/routing/redirecting_to_a_new_route/my_router.dart
diff --git a/example/angular/routing/redirecting_to_a_new_route/my_router.dart b/example/angular/routing/redirecting_to_a_new_route/my_router.dart
new file mode 100644
index 0000000000000000000000000000000000000000..6328ea94ea5a8b4bf734e3a26f415b0366777f46
--- /dev/null
+++ b/example/angular/routing/redirecting_to_a_new_route/my_router.dart
@@ -0,0 +1,17 @@
+library my_router;
+
+import 'package:angular/angular.dart';
+
+class MyRouteInitializer implements RouteInitializer {
+ init(Router router, ViewFactory view) {
+ router.root
+ ..addRoute(
+ name: 'about',
+ path: '/about',
+ enter: view('views/about.html'))
+ ..addRoute(
+ name: 'bio',
+ path: '/bio',
+ enter: view('views/bio.html'));
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698