使用Polymer到Javascript部署Dart代码时出现问题.我用DartEditor创建了一个聚合物应用程序,并做了一个简单的例子.此示例适用于Dartium,但是当我尝试将其构建为Polymer App(在Javascript中)并启动它时,应用程序失败.
我怎么能将Dart Polymer应用程序转换为Javascript?
这是我制作的示例代码失败:
example.html:
Example
例如-polymer.html
Text : {{ text }}
例如-polymer.dart
import 'package:polymer/polymer.dart';
import 'dart:html';
@CustomTag('example-polymer')
class ExampleBolymer extends DivElement with Polymer, Observable {
@published String text = "" ;
ExampleBolymer.created() : super.created() {
}
void change(Event e, var detail , InputElement target) {
text = target.value;
}
}
Günter Zöchb.. 6
加
transformers:
- polymer:
entry_points:
- web/example.html
到你的pubspec.yaml并致电
pub build
您的文件应位于web
包的目录中.
加
transformers:
- polymer:
entry_points:
- web/example.html
到你的pubspec.yaml并致电
pub build
您的文件应位于web
包的目录中.