diff --git a/modules/angular2/src/facade/lang.dart b/modules/angular2/src/facade/lang.dart index bebddc051d..9323bff237 100644 --- a/modules/angular2/src/facade/lang.dart +++ b/modules/angular2/src/facade/lang.dart @@ -30,7 +30,15 @@ bool isPromise(obj) => obj is Future; bool isNumber(obj) => obj is num; bool isDate(obj) => obj is DateTime; -String stringify(obj) => obj.toString(); +String stringify(obj) { + final exp = new RegExp(r"from Function '(\w+)'"); + final str = obj.toString(); + if (exp.firstMatch(str) != null) { + return exp.firstMatch(str).group(1); + } else { + return str; + } +} int serializeEnum(val) { return val.index;