zero_coding zero_coding - 1 month ago 22
Dart Question

Interoperate with typescript in dart

I am using angular2dart and want to know, ifsomeone do a very nice e.g. components in angular2 typescript, can I import that to dart?

Answer

No, Angular2 TS components can't be used in Angular2 Dart. You would need to port it.

You can run another Angular2 TS application side-by-side on the same page as the Angular2 Dart application, but that's it.

With Dart-JS-interop TypeScript libraries can be made available to Dart using https://github.com/dart-lang/js_facade_gen, but Angular2 Dart won't recognize anything as Angular2 component. This are then used pure JavaScript libraries with a nice typed Dart interface.