3
votes

I'm working with polymer elements in dart. I'm doing a single page web app. I'm wondering if there's a way to dynamically link the element I need for this page instead of linking (loading the source) all in the front. I know there is a deferred class that you can declare but I'm not sure it works with HTML template too. Any wayto dynamically link the element once you need it?

Thanks, Yi

1
I tried to play with dynamic linking of a polymer element, where I put all parts of my element in only one html file. But of course, it did not work, Dart needs to compile before to use scripts. Perhaps a day, but I don't think it will come soon.Druxtan

1 Answers

1
votes

DeferredLibrary should work for this (might still have some bugs or limitations) Using code in Dart that wasn't imported at compile time is currently not supported.