I'm using dart to develop an angular 2 project. I've seen some interesting component libraries written in typescript that I would like to use inside my app. Is it possible? If yes, how? I googled a lot but I couldn't find any hint...
There is no way to do that.
You would need to port the elements source to Dart. The ts2dart tool might help, but if the TypeScript code is not built with ts2dart
in mind, then it will only be able to translate parts of the code.
You might argue that Polymer.js elements can be used in Polymer.dart, but Polymer.dart itself is just a wrapper for Polymer.js and Polymer elements are wrapped in a similar way. Because Dart Angular2 is entirely Dart code this approach is not available.
Angular also requires build tools to be applied to the components code and these build tools are different for TS and Dart.
Dart and JS Polymer elements can be use with Dart Angular2 though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With