dart-polymer

Dart Language: Polymer - Working with views

非 Y 不嫁゛ 提交于 2019-12-24 12:31:35
问题 I'm developing my first "complex" application on Dart and I'm finding some trouble on how to work with more than one view (I want to develop the application to run within a single page). First of all, I'm assuming that this (using Polymer) is the right approach to work with various views (or "app screens") of the application. However, if it's not, I would like to know (of course). And by "app screens", I'm saying something like creating various forms in Java. So, for instance, I have two

Polymer app won't load in Safari (pre-1.0)

不羁岁月 提交于 2019-12-24 11:42:17
问题 A load of errors, and my app won't load. True on desktop (OSX El Capitan) and mobile (iOS9). http://d.pr/i/1lvBa Errors like: TypeError: Attempting to change configurable attribute of unconfigurable property. ReferenceError: Can't find variable: HTMLImports (anonymous function) atEndOfMicrotask TypeError: document.registerElement is not a function. (In 'document.registerElement('polymer-element', {prototype: prototype})', 'document.registerElement' is undefined) And more... My Polymer (Dart)

building a reorderable list (via dnd) using core-list and core-drag-drop

走远了吗. 提交于 2019-12-24 11:19:39
问题 I'm trying to build a reusable polymer web component that supports reordering items via drag and drop in a core-list. The interface I want is essentially the same as core-list <reorderable-list id="list" data="{{data}}" height="60"> <template> <some-reorderable-element> </some-reorderable-element> </template> </reorderable-list> My current thinking is that I want each row to be wrapped as follows <a-container> <draggable-member> <some-reorderable-element> </some-reorderable-element> <

Change template content at runtime

。_饼干妹妹 提交于 2019-12-24 08:38:14
问题 I want to build Polymer element that generates a list output <polymer-element name="polymer-list> <template> <template id="my-repeat" repeat="{{item in listData}}"> <!-- use content here --> <!-- some fix dummy content to see how this is handled --> <div id="div_{{item['item']['index']}}">{{item['item']['index']}}</div> </template> <content id="content" select="*"></content> </template> <script type="application/dart" src="polymer_list.dart"></script> </polymer-element> and I want to move the

Template repeat not working for nested list (Polymer.dart)

只谈情不闲聊 提交于 2019-12-24 05:30:42
问题 Due to the lack of multi-dimensional array support in dart, I thought of using List. Dart code : class MyModel extends Object with Observable { @observable List<List<int>> dataList = toObservable(new List<List<int>>()); } void main() { initPolymer().run(() { Polymer.onReady.then((_) { var template = querySelector("#bindValueTemplate") as AutoBindingElement; var model = template.model = new MyModel(); for (int i=0; i<2;i++) { List<int> in1 = new List<int>(); for (int j=0; j<2; j++) { in1.add(j

Why does :host(:hover) not work here?

﹥>﹥吖頭↗ 提交于 2019-12-23 12:44:42
问题 I am not able to figure out how :host(:hover) works on child custom elements of a parent custom element. Can someone explain how to make this work? todoitem.html <!-- import polymer-element's definition --> <link rel="import" href="packages/polymer/polymer.html"> <polymer-element name="my-li" extends="li"> <style> :host(:hover){ color: red; } </style> <template> <content></content> </template> <script type="application/dart" src="todoitem.dart"></script> </polymer-element> todoitem.dart

Polymer's core-scroll-header-panel with submenu toolbar

百般思念 提交于 2019-12-23 03:16:27
问题 The application I am developing consists of several major sections. To this end, I have a global toolbar for the entire application and a toolbar that is specific to the particular section of the application. Here is a gist that demonstrates what the view for an individual application might look like: https://gist.github.com/mattjonesorg/33b2bbcb0b0c81feb5ca (Paste the gist into the polymer designer for a quick view) I have the main application's toolbar as a core-scroll-header-panel. The

two polymer elements (paper-input) referencing the same object on different instance variable does not work

僤鯓⒐⒋嵵緔 提交于 2019-12-23 02:41:15
问题 I have two polymer elements (paper-input) referencing the same object on different instance variable. When I change the text on one paper-input element, another paper-element does not change, although the referenced object has changed. Following details: >>> Browser >>> main_app.html <dom-module id="main-app"> <template> <h3>Lista de Produtos</h3> <paper-fab icon="add" on-tap="adicionarProduto"></paper-fab> <template is="dom-repeat" items="{{produtos}}" as="item"> <div class="layout vertical"

How to structure a Dart application with multiple views with Polymer

我只是一个虾纸丫 提交于 2019-12-22 18:46:30
问题 This question has been asked before but since the answer to that question Dart has adopted polymer to replace Web UI. Is there a Polymer version of the answer to this question? Also, I saw the answer relating to routes, which I like, but investigating it further has led me to believe that routes and polymer do not play well together yet. I would also like to solicit views on the new Angular-Dart since I am comfortable with Angular but see it as a competing technology to polymer at least in

Why do I get an Internal Dartium Exception when using custom elements?

三世轮回 提交于 2019-12-22 18:29:18
问题 I am seeing this error in my console: Exception: InvalidStateError: Internal Dartium Exception PolymerDeclaration.registerType (package:polymer/src/declaration.dart:241:22) PolymerDeclaration.register (package:polymer/src/declaration.dart:175:17) PolymerDeclaration._register (package:polymer/src/declaration.dart:114:13) PolymerDeclaration.registerWhenReady (package:polymer/src/declaration.dart:109:14) _notifyType (package:polymer/src/declaration.dart:514:49) Polymer.register (package:polymer