Issue The answer to question Cascading style sheets use "id" or "class" says for id’s Put an ID on an element if “it is the …” (e.g. navigation) and a further comment: Because of this ids can only be used
Continue readingTag: dart-polymer
Is there an easier way of getting elements by ID in my Polymer Element?
Issue I have a PolymerElement in which I frequently need to access internal elements by ID. My polymer element looks like this: <polymer-element name=”my-element”> <template> <div id=”idOne”>…</div> <div id=”idTwo”>…</div> …. </template> </polymer-element> Currently accessing the various divs looks like this:
Continue readingHow do I pass multiple entry_points to polymer transformer in pubspec.yaml?
Issue Now that pub build supports building Polymer apps, how do I pass multiple entry_points to the Polymer transformer in my pubspec.yaml file? When I try to build with this syntax both files have errors: transformers: – polymer: entry_points: web/reports.html,
Continue readingHow do I access a non-@observable field via polymer bindings with dart2js in Dart?
Issue Seth Ladd’s Polymer.dart examples are awesome and really helpful. The observable_list example appends DateTime instances to an ObservableList timestamps. Although DateTime does not extend Observable, modifying my_element.html to access a field on {{ts in timestamps}} works when running in
Continue readingHow to monitor indexdb stores for content changes?
Issue I currently have a PolymerElement which is binding to a observable list, and using <template repeat=”{{cardnames}}”> <div>{{ }}</div> </template> So far, so good. The cardnames is populated from a IndexDB store, I’m using lawndart for this. It works for
Continue readingHow to bind FileList to Observable in Dart Polymer?
Issue I’m trying to use a file upload in combination with Dart & Polymer. Consider the following files: my-upload.html <polymer-element name=”my-upload”> <template> <style></style> <input type=”file” id=”uploader” bind-files=”{{files}}” on-change=”{{uploadFiles}}” multiple> </template> <script type=”application/dart” src=”my-upload.dart”></script> </polymer-element> my-upload.dart @CustomTag(‘my-upload’) class MyUpload extends PolymerElement
Continue readinginstanceTemplate in polymer 0.8.7
Issue This question is a follow up question to this question. After upgrading to polymer 0.8.7 the following code stopped working: DocumentFragment instanceTemplate(Element template) => template.createInstance(this, new PolymerExpressions(globals: { ‘splitnewline’: (String input) => input.split(“\n”) })); Looks like Element doesn’t contain
Continue readingBind text with line breaks
Issue I have a binding to a string with a line break, like ‘Hello\nWorld’ in my model. Now I want to display the value in my template using {{x}}. But the line break is not correctly displayed. Does polymer provide
Continue readingDart Polymer asynchronous property changes not working
Issue I’m having trouble updating Dart Polymer elements asynchronously. Let’s say I have a simple element that contains a label and a text input. The template <polymer-element name=”control-text”> <template> <label for=”{{id}}”>{{label}}</label> <input id=”{{id}}” value=”{{value}}” type=”text” /> </template> <script type=”application/dart” src=”control-text.dart”></script>
Continue readingBind content containing html tags
Issue How can I display content containing html tags like <br> inside a polymer-element like: <polymer-element name=”my-element”> <template> {{mylongtext}} </template> <script …></script> </polymer-element> @CustomTag(“my-element”) class MyElement extends PolymerElement { @observable string mylongtext = “bla bla <br> bla bla <strong> bla
Continue reading