dart-polymer

Google Dart Pages within Tabs

这一生的挚爱 提交于 2019-12-13 00:00:39
问题 I'm attempting to load "pages" within tabs in Dart and can not seem to set them up properly. My below example has pages that are supposed to show text inputs on each page but the pages are within tabs. I'm not sure how to properly set these pages up within tabs. So far I had been going by this example: Switching content when tab selected using polymer ui elements tabs Please let me know if you need more information. <paper-tabs id="Tabs" selected="0" style='width:800px; height:175px; color

What is the alternative to maps in polymer Dart 1.0?

和自甴很熟 提交于 2019-12-12 23:20:21
问题 I notice in the Polymer Dart issue #569, that the use of maps is discouraged, because they're inefficient. What is (will be) the alternative? I use maps a lot. 回答1: The original reasoning for the comment about inefficiency no longer applies. Previously the whole map had to be copied to a new JsObject each time it was passed to JS, but that is no longer the case. 来源: https://stackoverflow.com/questions/32791689/what-is-the-alternative-to-maps-in-polymer-dart-1-0

using paper-tabs in a component in dart angular2

不羁的心 提交于 2019-12-12 19:26:34
问题 I'm trying to utilize polymer paper-tabs in a dart angular2 component, but am unable. What am I missing in the code below? In the following code, the paper-tabs specified in the index.html template work fine, but the paper-tabs in the main-app.html are not formatted correctly and disappear when clicked without any proper animation. pubspec.yaml name: tabs_test version: 0.0.1 description: Test Paper Tabs environment: sdk: '>=1.13.0 <2.0.0' dependencies: angular2: ^2.0.0-beta.13.1 polymer: ^1.0

InvalidCharacterError: “fred”

流过昼夜 提交于 2019-12-12 17:41:22
问题 I am sure his must be a newbie question. In simple terms I wanted to define my first Polymer-dart component. Only I keep kicking my toe on the same speed-hump. To keep things very simple, I've stripped it back to a very simple example. I did a simple rename of the example: ' stopwatch 'component from the Dart component Polymer-dart tutorial: Define a Custom Element I had errors similar to the one in the question title, so the renamed component is: ' fred ' ... from: ' tute-stopwatch ' When

Dart Exception: Already registered (Polymer) prototype for element x

我与影子孤独终老i 提交于 2019-12-12 10:42:54
问题 I've two polymer elements that share the same dart file. In the dart file I declare both the PolymerElement classes. Until polymer 0.15.0+1 it was working fine. I've updated the project to polymer 0.15.1 and now I get this exception: Exception: Already registered (Polymer) prototype for element x Where x is the first polymer. I think the polymer transformer is trying to register it two times, the first scanning the x polymer html file, the second when scanning the other element html file. An

How to embed a jquery ui widget into a polymer-dart webcomponent

房东的猫 提交于 2019-12-12 09:04:39
问题 I try to embed a jquery ui widget, f.e. a datepicker into a polymer-dart webcomponent. The Webcomponent is defined like that: <polymer-element name="my-datepicker"> <template> <div id="datepicker"></div> </template> <script type="application/dart" src="clickcounter.dart"></script> </polymer-element> The initialisation of this widget is done in JS like that <script> $(function() { $( "#datepicker" ).datepicker();}); </script> How can I initialize that widget in dart in my polymer.dart

Import and make use of Polymer-Dart 1.0.0 release candidate

女生的网名这么多〃 提交于 2019-12-12 08:15:25
问题 I do love Polymer - and I do love Dart. And the Polymer-Dart library was pretty much the best thing ever happend to Web development (imho). Polymer 1.0 has been released a while ago and Googlers are working hard to build the corresponding Dart wrapper as stated in Dart's Web Development Google Group. I've built a fairly huge project quite a while ago in Polymer 0.5 and it's time to upgrade. Due to various changes in Polymer 1.0 the migration is quite hard and a lot of code breaks are expected

custom_element_apigen: gives an error importing paper-datatable to Dart

半腔热情 提交于 2019-12-12 03:25:29
问题 I following the steps, accord to https://github.com/dart-lang/custom-element-apigen: node/npm (v3.5.3) installed bower (v1.7.2) installed hydrolysis (v1.21.4) installed .bowerrc created with following content { "directory": "lib/src" } bower install --save paper-datatable (https://github.com/David-Mulder/paper-datatable) executed apigen.yaml created with following content files_to_generate: - paper-datatable\paper-datatable.html custom_element_apigen library add on pubspec.yaml dependencies:

How to use CSS mixins with Angular 2, Dart and Polymer

人盡茶涼 提交于 2019-12-12 02:15:18
问题 I'm using polymer and polymer_elements in my angular2-dart project. I'm able to add polymer elements (such as paper-card), but I'm not able to use css-mixins, I don't know if I missing an import or something. My .dart import 'package:angular2/core.dart'; //Polymer imports import 'package:polymer_elements/paper_card.dart'; import 'package:polymer_elements/paper_button.dart'; import 'package:polymer_elements/paper_icon_button.dart'; import 'package:polymer_elements/iron_icon.dart'; import

Routes in DART, s server required?

Deadly 提交于 2019-12-12 01:57:39
问题 I tried both AngularDART routes, and routes with Polymer, this example but found, that none is working once I open the file from Dartium directly, but both work perfectly once I run them from Dart editor! am I doing something wrong! thanks 回答1: This is because when you run from DartEditor (Ctrl+R) pub serve is launched which acts as a web server for the browser. This doesn't mean that you need a web server to run this example though. What makes the difference is that pub serve runs