| Index: third_party/pkg/route_hierarchical/example/full/root-view.dart
|
| diff --git a/third_party/pkg/route_hierarchical/example/full/root-view.dart b/third_party/pkg/route_hierarchical/example/full/root-view.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a780a9ef5b5d9b7f8c211c2d79869f5d5b6a62e9
|
| --- /dev/null
|
| +++ b/third_party/pkg/route_hierarchical/example/full/root-view.dart
|
| @@ -0,0 +1,20 @@
|
| +library companyinfo;
|
| +
|
| +import 'dart:html';
|
| +import 'package:web_ui/web_ui.dart';
|
| +import 'package:route_hierarchical/client.dart';
|
| +
|
| +class RootView extends WebComponent {
|
| + RouteHandle route;
|
| + @observable String currentRouteName;
|
| +
|
| + inserted() {
|
| + ['home', 'companyInfo', 'portfolio'].forEach((routeName) =>
|
| + route.getRoute(routeName)
|
| + .onRoute.listen((_) => currentRouteName = routeName));
|
| + }
|
| +
|
| + removed() {
|
| + route.discard();
|
| + }
|
| +}
|
|
|