From 4a43230de4884062e085f643fdd862169359b1b5 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 11 Nov 2015 04:24:30 -0800 Subject: [PATCH] fix(core): various dart-specific fixes for core and facades For some reason these showed up only now in internal Dart analyzer output. --- modules/angular2/src/core/util.dart | 4 ++++ modules/angular2/src/facade/browser.dart | 4 +++- modules/angular2/src/facade/collection.dart | 4 ++-- modules/angular2/src/facade/facade.dart | 7 +++++++ 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 modules/angular2/src/core/util.dart create mode 100644 modules/angular2/src/facade/facade.dart diff --git a/modules/angular2/src/core/util.dart b/modules/angular2/src/core/util.dart new file mode 100644 index 0000000000..a4c365c124 --- /dev/null +++ b/modules/angular2/src/core/util.dart @@ -0,0 +1,4 @@ +library angular2.src.core.util; + +// the ts version is needed only for TS, we don't need a Dart implementation +// because there are no decorators in Dart. diff --git a/modules/angular2/src/facade/browser.dart b/modules/angular2/src/facade/browser.dart index 71931f9717..8c364d7f7d 100644 --- a/modules/angular2/src/facade/browser.dart +++ b/modules/angular2/src/facade/browser.dart @@ -5,11 +5,11 @@ library angular2.src.facade.browser; import 'dart:js' show context; +import 'dart:html' show Location, window; export 'dart:html' show document, - location, window, Element, Node, @@ -21,6 +21,8 @@ export 'dart:html' Location, EventListener; +Location get location => window.location; + final _gc = context['gc']; void gc() { diff --git a/modules/angular2/src/facade/collection.dart b/modules/angular2/src/facade/collection.dart index 54e5dcdd6c..d01cb8c40d 100644 --- a/modules/angular2/src/facade/collection.dart +++ b/modules/angular2/src/facade/collection.dart @@ -1,8 +1,8 @@ library facade.collection; -import 'dart:collection' show IterableBase, Iterator; +import 'dart:collection' show IterableBase; import 'dart:convert' show JsonEncoder; -export 'dart:core' show Map, List, Set; +export 'dart:core' show Iterator, Map, List, Set; import 'dart:math' show max, min; var jsonEncoder = new JsonEncoder(); diff --git a/modules/angular2/src/facade/facade.dart b/modules/angular2/src/facade/facade.dart new file mode 100644 index 0000000000..4485565590 --- /dev/null +++ b/modules/angular2/src/facade/facade.dart @@ -0,0 +1,7 @@ +library angular2.src.facade.facade; + +// Public API for Facade +export "lang.dart" show Type; +export "async.dart" show Stream, EventEmitter; +export "exceptions.dart" show WrappedException; +export "exception_handler.dart" show ExceptionHandler;