那是实验性提议的语法。在Babel中,您必须启用
es7.classProperties。通过
optional: ['es7.classProperties']
通天塔。确切的方法取决于您如何进行转译。
如果您想做标准的ES6,也可以做
static get $inject(){ return ["$scope", "$state", "$window"]; }
那是实验性提议的语法。在Babel中,您必须启用
es7.classProperties。通过
optional: ['es7.classProperties']
通天塔。确切的方法取决于您如何进行转译。
如果您想做标准的ES6,也可以做
static get $inject(){ return ["$scope", "$state", "$window"]; }