Using ES6 Classes as Angular 1.x directives

后端 未结 10 856
南旧
南旧 2020-12-04 07:57

I\'m doing a small project to play around the goody bag the ES6 is bringing, I\'m trying to set register a class as an angular directive, but I\'m running into this error \"

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-04 08:24

    I had a similar problem. But in my case it worked and failed when I deployed to production. And it failed because production has the latest version of 6to5. This could be prevented by using npm shrinkwrap. According to the latest ES6 spec you can't use a class like this. https://github.com/babel/babel/issues/700

提交回复
热议问题