diff --git a/modules/angular2/src/facade/lang.dart b/modules/angular2/src/facade/lang.dart index 7f64937600..4ed795451e 100644 --- a/modules/angular2/src/facade/lang.dart +++ b/modules/angular2/src/facade/lang.dart @@ -5,6 +5,8 @@ import 'dart:math' as math; import 'dart:convert' as convert; import 'dart:async' show Future; +String getTypeNameForDebugging(Type type) => type.toString(); + class Math { static final _random = new math.Random(); static int floor(num n) => n.floor(); diff --git a/modules/angular2/src/facade/lang.ts b/modules/angular2/src/facade/lang.ts index 03402316cf..d99cd9a206 100644 --- a/modules/angular2/src/facade/lang.ts +++ b/modules/angular2/src/facade/lang.ts @@ -5,6 +5,10 @@ export {_global as global}; export var Type = Function; export type Type = new (...args: any[]) => any; +export function getTypeNameForDebugging(type: Type): string { + return type['name']; +} + export class BaseException extends Error { stack; constructor(public message?: string, public originalException?, public originalStack?) {