Dart &引用;NoSuchCapabilityError:没有调用方法的功能;将操作指定给按钮时

Dart &引用;NoSuchCapabilityError:没有调用方法的功能;将操作指定给按钮时,dart,dart-polymer,Dart,Dart Polymer,main_app.html: *剪断* *剪断* 下一步 步骤是{{step}} 主应用程序:dart: @HtmlImport('main_app.html')) *剪断* @聚合注册器('main-app') 类MainApp扩展了聚合关系{ *剪断* @属性int step=0; MainApp.created():super.created(); *剪断* @可反射 void nextStep(){ 步骤=步骤+1; 打印(“下一步!”); } } 当我运行此命令并按下按钮时,在D

main_app.html:


*剪断*
*剪断*
下一步
步骤是{{step}}

主应用程序:dart:

@HtmlImport('main_app.html'))
*剪断*
@聚合注册器('main-app')
类MainApp扩展了聚合关系{
*剪断*
@属性int step=0;
MainApp.created():super.created();
*剪断*
@可反射
void nextStep(){
步骤=步骤+1;
打印(“下一步!”);
}
}
当我运行此命令并按下按钮时,在Dartium的控制台中出现以下错误:

NoSuchCapabilityError: no capability to invoke the method 'nextStep'
我做错了什么?

请再试一次

void nextStep(event, [_]) {


您需要使用Polymer API更新值,以便Polymer更新
set('step',step++)
void nextStep([_, __]) {