Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dart聚合物,访问脚本中的自定义属性返回null_Dart_Dart Polymer_Polymer - Fatal编程技术网

Dart聚合物,访问脚本中的自定义属性返回null

Dart聚合物,访问脚本中的自定义属性返回null,dart,dart-polymer,polymer,Dart,Dart Polymer,Polymer,我将客户机作为参数发送到自定义客户机followup detail(在home.html中)并在“client\u followup\u detail.html”中显示它们的信息,但当我尝试从“client\u followup\u detail.dart”访问客户机属性时,会发生异常 home.html client_followup_detail.html {{client.state} {{client.mobile} {{client.lastContactDate} 客户跟踪

我将客户机作为参数发送到自定义客户机followup detail(在home.html中)并在“client\u followup\u detail.html”中显示它们的信息,但当我尝试从“client\u followup\u detail.dart”访问客户机属性时,会发生异常

home.html



client_followup_detail.html

{{client.state}
{{client.mobile}
{{client.lastContactDate}
客户跟踪详细信息。dart

@已发布的客户端;
ClientFollowupDetail.created():super.created(){
eventBus=getInstanceEventBus();
打印(client.names);//客户端为空
}
错误:

异常:null对象没有getter“names”。
NoSuchMethodError:找不到方法:“名称”
收件人:空
论点:[]

客户端FollowUpDetail实例可能未被polymer完全初始化

create
代码移动到
ready
的覆盖中可能会有所帮助:

ready() {
  super.ready();
  eventBus = getInstanceEventBus();
  print(client.names);
}

有趣的部分可能是home.dart
clientSelect
从哪里来?你能试着把你的
{{clientSelect}}
放在
标记之外,并检查它在你的页面上产生了什么输出(比如`{{clientSelect}

)。