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

Unified Diff: third_party/pkg/route_hierarchical/example/full/company-info-loader.dart

Issue 176943008: Update the Angular/DI tests to latest from github. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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: third_party/pkg/route_hierarchical/example/full/company-info-loader.dart
diff --git a/third_party/pkg/route_hierarchical/example/full/company-info-loader.dart b/third_party/pkg/route_hierarchical/example/full/company-info-loader.dart
deleted file mode 100644
index b8184ccd20083e56c143bbc205d797d05c31807a..0000000000000000000000000000000000000000
--- a/third_party/pkg/route_hierarchical/example/full/company-info-loader.dart
+++ /dev/null
@@ -1,39 +0,0 @@
-library company_info_loader;
-
-import 'dart:html';
-
-import 'package:web_ui/web_ui.dart';
-import 'package:route_hierarchical/client.dart';
-
-import 'data.dart' as data;
-
-
-class CompanyInfoLoaderComponent extends WebComponent {
- RouteHandle route;
- @observable var company;
- @observable Route companyRoute;
-
- inserted() {
- companyRoute = route.getRoute('companyId');
- companyRoute.onRoute.listen(_showCompanyInfo);
- }
-
- removed() {
- route.discard();
- }
-
- _showCompanyInfo(RouteEvent e) {
- var tokenInt = int.parse(e.parameters['companyId'], onError: (s) => -1);
- if (tokenInt > -1) {
- data.fetchCompany(tokenInt).then((result) {
- if (result == null) {
- window.alert('Unable to fetch company $tokenInt');
- }
- company = result;
- });
- } else {
- // TODO: navigate to invalid company route...
- window.alert('Invalid company id $tokenInt');
- }
- }
-}

Powered by Google App Engine
This is Rietveld 408576698