简体   繁体   English

聚合物飞镖与聚合物js:使用该组件时是否重要?

[英]polymer dart vs polymer js: does it matter when using the component?

I want to build a polymer component. 我想建立一个聚合物组件。 I can build it using Javascript. 我可以使用Javascript构建它。 I can build it using Dart. 我可以使用Dart构建它。

For the person using it (me, someone else), does it make a difference or is the polymer packaging hiding all the magic inside? 对于使用它的人(我,其他人),它是否有所作为或者聚合物包装是否隐藏了所有的魔力?

When you build it in JavaScript you should be able to use it in Dart. 当您使用JavaScript构建它时,您应该能够在Dart中使用它。 There are some problems and it might need some manual tweaking to make it work. 有一些问题,可能需要一些手动调整才能使其正常工作。 This is work in progress and will become easier soon (for example bower support for Darts pub ). 这项工作正在进行中,并且很快就会变得更容易(例如,对Darts pub凉亭支持)。

There is a package that helps generating a wrapper for Polymer.js elements to be easily used in Dart https://pub.dartlang.org/packages/custom_element_apigen 有一个包可以帮助生成Polymer.js元素的包装器,以便在Dart https://pub.dartlang.org/packages/custom_element_apigen中轻松使用

When you build it in Dart you can use it only in a Dart application but not in a JavaScript app. 在Dart中构建它时,您只能在Dart应用程序中使用它,但不能在JavaScript应用程序中使用它。
This may change in the future but not to soon I guess but as I understand it this is work in progress. 这可能会在未来发生变化,但不是很快我猜,但据我所知,这是正在进行中的工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM