我想使用烟包,它在服务器端工作(不需要在调试模式下使用转换器)。
在客户端,高聚物已经使用了烟雾,当我使用像assert(sk.isSubclassOf(type, Message));这样的方法时,它会失败,因为它内部检查_parents集合,这只包含在我的页面上使用的聚合物元素,而不是我的其他(纯Dart)类。
我如何初始化烟雾,以便它也识别我的其他类。
发布于 2014-10-06 09:25:40
我让它使用自定义的main()作为我的聚合物条目页面。
import 'package:smoke/mirrors.dart' as skm;
import 'package:polymer/polymer.dart';
void main() {
skm.useMirrors(); // worked on the server side without calling this method
initPolymer().run(() {});
}https://stackoverflow.com/questions/26213204
复制相似问题