dart-polymer

Getting error converting dart2js on polymer project

£可爱£侵袭症+ 提交于 2020-01-02 08:17:15
问题 Unsupported operation: Can't use ownerName in reflection because it is not included in a @MirrorsUsed annotation. ownerName is just an published attribute on the polymer element. I understand there are a few things out there (on web, not on here) like this but none have a solid answer... I also get this below it: NoSuchMethodError : method not found: 'Symbol("title")' Anyone got any ideas. Been wrestling with this for 3 hours and ready to dump polymer. Though It was fun in dartium, if it

Query elements inside <content> of a custom element

时间秒杀一切 提交于 2019-12-29 07:16:11
问题 I have two custom elements. The one of them is nested to another one. Something like this: <polymer-element name="my-element"> <template> <div> Bla, Bla, Bla! </div> </template> <script type="application/dart" src="my_element.dart"></script> </polymer-element> <polymer-element name="my-decorator"> <template> <div> <div>Decorator</div> <content> <!-- my-element will be here--> </content> </div> </template> <script type="application/dart" src="my_decorator.dart"></script> </polymer-element>

How to remove a child component with a delete button in the child itself

和自甴很熟 提交于 2019-12-29 01:45:12
问题 I have an email component (email-tag.html) that consist of a label, a select and a delete button element. The email-tag.html component is hosted in its parent email-view-tag.html. email-view-tag contains an add-email-button that adds the email-tag element to the DOM each time it is clicked. I need help in removing an added email-tag component when its delete-button is clicked. It is the compnoent that contains the delete-button that should be removed. The two components are shown below: email

Dynamically create polymer element

[亡魂溺海] 提交于 2019-12-29 00:47:11
问题 I have defined login element as follows: <polymer-element name="my-login" extends="form"> <template> ...</template> and dart class as follows: @CustomTag('my-login') class MyLogin extends PolymerElement { .... } In the main application component, I am trying to create my-login as follows: MyLogin p = new Element.tag("my-login", "FormElement"); This generates exception: Exception: type 'HtmlElement' is not a subtype of type 'MyLogin' of 'p'. The code works if "extends=form" is removed from

How to remove an item from a paper-listbox?

白昼怎懂夜的黑 提交于 2019-12-25 07:59:37
问题 I can add an item to a paper-listbox with Polymer.dom($['mylistbox']).append(paperItem); However I'm having trouble deleting it from the list afterwards. I tried: paperItem.remove(); That initially makes it dissapear, but it appears again after selecting another item in the list. How do I remove a paper-item from a listbox? 回答1: Polymer.dom($['mylistbox']).removeChild(paperItem); 来源: https://stackoverflow.com/questions/39053131/how-to-remove-an-item-from-a-paper-listbox

Dart Polymer form field not showing validate errors

ⅰ亾dé卋堺 提交于 2019-12-25 03:04:49
问题 I have code similar to this example working nicely with a sing-page app using AngularJS. I wanted to upgrade the page by using Dart and Dart-Polymer. In the HTML5 AngularJS version the HTML types are validated by default. So type="email", type="url", type="date", etc. work and give validation errors when filling the form. I've based the following example on the classes and mark-up from the form Dart Polymer tutorial: Get Input from a Form tutorial Take a look at the field, theData[' authorUrl

How to make Dart Editor find referenced packages

…衆ロ難τιáo~ 提交于 2019-12-25 02:56:14
问题 In the Dart Editor (x64), I create a new project from the "Polymer Web Application" template. Immediately after creation, Dart Editor runs pub get command, executes building workspace. Then for every import directive, like import 'package:polymer/polymer.dart'; I got the following error: Target of URI does not exist: 'package:polymer/polymer.dart' How can I make Dart Editor understand references for standard libraries? 回答1: I assume your pub-cache is corrupted which can usually be fixed by

paper-radio-button ripple persist after selection change

不羁的心 提交于 2019-12-24 17:19:06
问题 Given a paper-radio-group as shown below <paper-radio-group id="sex-group" selected='1'> <paper-radio-button label='Male'></paper-radio-button><br> <paper-radio-button label='Female'></paper-radio-button> </paper-radio-group> When the Male button is selected followed by the Female button or vice versa, inconsistently the ripple remains on the last selected button even though the selection changes. It occurs in a unpredictable manner with no stack trace. In the graphic above, Female was

<debug target crashed> error when selecting date in <input type='date'>

笑着哭i 提交于 2019-12-24 16:51:57
问题 I have the following simple .dart and .html files .dart //import 'dart:html'; import 'package:polymer/polymer.dart'; /// A Polymer `<main-app>` element. @CustomTag('main-app') class MainApp extends PolymerElement { @observable DateTime today = new DateTime.now(); @observable String aDate = ''; /// Constructor used to create instance of MainApp. MainApp.created() : super.created(); void onChangeFired() { print(aDate); } } .html <!-- import polymer-element's definition --> <link rel="import"

material Design with Angular Dart and Polymer dart. Compilation issues

喜夏-厌秋 提交于 2019-12-24 16:27:37
问题 I am at my whits end here. I've been trying over the last 48 hours to get these technologies to work.I've read everywhere that they should be able to work but it's just one problem after the other. I've tried various combinations of my pubspeck.yaml file but the results I get are either the code simply wont build, or it just doesn't work >.> I'll appreciate any help I can get! my pubspeck.yaml: name: blah dependencies: angular: 0.12.0 angular_node_bind: any shadow_dom: any browser: any