如何访问父类成员函数';Javascript中的输入参数

如何访问父类成员函数';Javascript中的输入参数,javascript,scope,closures,Javascript,Scope,Closures,我想在这个ES6类中访问函数的输入参数'current_dir',但它不起作用。怎么了 class helloClass { expand_dir(current_dir) { let defer = $helloAjaxCall(); defer.done(function(data) { console.log(current_dir); }.bind(this)); } } log.console应该是另一种方式,您所演示的应该绝对有效。

我想在这个ES6类中访问函数的输入参数'current_dir',但它不起作用。怎么了

class helloClass {

  expand_dir(current_dir) {
    let defer = $helloAjaxCall();

    defer.done(function(data) {
       console.log(current_dir);
    }.bind(this));
  }
}

log.console
应该是另一种方式,您所演示的应该绝对有效。