0

I am trying to build a Dart client-side project using Polymer. I have followed numerous different instructions found online. For example I have followed the instructions given here:

http://radar.oreilly.com/2013/09/build-reusable-widgets-for-the-web-with-polymer-and-dart.html

When I do that and I compile using 'pub build' I find that the only dart files that are built to corresponding js files are ones that have a 'main' method in them. For example, no auto_complete.dart.js or auto_complete.dart.precompiled.js is created.

I can cause these files to be created by adding a 'main', but that does not seem right to me or to the responders in the following thread:

https://groups.google.com/a/dartlang.org/forum/#!topic/misc/8JfbwwCodrA

If I import the dart file into my main dart file then the javascript is included with that. However nothing shows for the templates and I see a message in the chrome 36 console saying auto_complete.dart.precompiled.js can't be found.

I would put all the code in here but the problem shows regardless of what code examples I use. For example it shows when using the code for this example, as-is except for upgrading the ObservableMixin to Observable and putting in the constructor:

http://radar.oreilly.com/2013/09/build-reusable-widgets-for-the-web-with-polymer-and-dart.html

Nigel W
  • 21
  • 4
  • From your question it is not obvious what you are actually doing. You could start with the `Sample web application using the polymer library` created by DartEditor (menu File > New Project) and then add to your question what you got and how it deviates from what you expected. – Günter Zöchbauer Aug 13 '14 at 15:50
  • Thanks, Günter, for your quick reply. The sample produced by the Dart Editor did indeed work for me (pub build, copy into my Jetty server pages, and it works fine). Using that as a starting point I am now rapidly moving forward with Polymer in our app. The problem really comes down to the fact that there are loads of examples out there, they are all different in terms of what they import/export, which of the many versions with breaking changes were they written for etc. So none of the other examples I tried actually work anymore. Your help has been much appreciated. – Nigel W Aug 14 '14 at 08:21
  • Glad to hear! I'll vote to close this question as `can't be reproduced anymore'. I Hope that's fine with you. If you add a comment that this is not solved for you the question will be kept open. – Günter Zöchbauer Aug 14 '14 at 08:25

0 Answers0