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

Side by Side Diff: third_party/pkg/route_hierarchical/example/full/index.dart

Issue 180873006: Update the Angular/DI tests to latest from github. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review feedback Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 import 'package:logging/logging.dart';
2 import 'package:route_hierarchical/client.dart';
3
4 Router router;
5 String homeLink;
6 String portfolioLink;
7
8 void main() {
9 new Logger('')
10 ..level = Level.FINEST
11 ..onRecord.listen((r) =>
12 print('${new DateTime.now()}: [${r.level}] ${r.message}'));
13
14 router = new Router(useFragment: true);
15 router.root
16 ..addRoute(
17 name: 'home',
18 defaultRoute: true,
19 path: '/home')
20 ..addRoute(
21 name: 'companyInfo',
22 path: '/companyInfo',
23 mount: (child) => child
24 ..addRoute(
25 name: 'companyId',
26 path: '/:companyId',
27 mount: new _CompanyInfoRoutable())
28 ..addRoute(
29 name: 'invalid',
30 path: '/invalid',
31 defaultRoute: true))
32 ..addRoute(
33 name: 'portfolio',
34 path: '/portfolio',
35 mount: (Route child) => child
36 ..addRoute(
37 name: 'list',
38 path: '/list',
39 defaultRoute: true)
40 ..addRoute(
41 name: 'company',
42 path: '/:tabId',
43 mount: new _CompanyInfoRoutable()));
44 router.listen();
45
46 homeLink = router.url('home');
47 portfolioLink = router.url('portfolio');
48 }
49
50 class _CompanyInfoRoutable implements Routable {
51 void configureRoute(Route route) {
52 route
53 ..addRoute(
54 name: 'info',
55 defaultRoute: true,
56 path: '/info')
57 ..addRoute(
58 name: 'activities',
59 path: '/activities')
60 ..addRoute(
61 name: 'notes',
62 path: '/notes');
63 }
64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698