Question

Edit: I did the experiment all over again (and updated to polymer 0.12) and it turns out that now I'm only I'm getting the "Uncaught Strict get failed, invalid object." error at startup coming from platform.js - and actually the app works if I just resume the execution at this point via pressing F8 in DartEditor. The question is now misleading, that's why I'm adding this comment at the top. My main app is still not working and gives me the "method not found" error, but this is another story. I am leaving the original message below for historical reasons.

If you create a dummy application using the polymer template, it starts fine, but once you move the clickcounter to another directory, you will start getting "NoSuchMethodError: method not found: 'whenPolymerReady'" error. I have updated references accordingly and the new folder structure looks like that:

/lib
  /src
    /test
       clickcounter.dart
       clickcounter.html
/web
  polytest.html 

This is how the modified line in the polytest.html looks:

<link rel="import" href="../lib/src/test/clickcounter.html">

This folder structure was working perfectly in Dart 1.4, but I couldn't get it to work since the upgrade to 1.5. I am using polymer v0.12.

I wonder if I'm doing it wrong and the folder structure should be different? Is there a "blessed" way of structuring your folders with polymer?

Was it helpful?

Solution

<link rel="import" href="../packages/src/test/clickcounter.html">

If it doesn't work prepend another ../ (I'm never absolutely sure how far up is necessary - but I think it is one level above of your_package directory even when it's counter-intuitive)
but pub serve or pub build print a correct suggestion of the entire path if the number of ../ is not correct.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top