How do I write angular2 without decorator syntax?

前端 未结 2 1243
慢半拍i
慢半拍i 2021-01-23 11:57

I\'m roughly following JavaScript/TypeScript quickstart for Angular2 to write my app in ES6 but can\'t get the decoractor to works

entry.j

2条回答
  •  野性不改
    2021-01-23 12:06

    It is because you are using Babel 6 and decorators are currently disabled for it, but you can make it work with the legacy plugin transform-decorators-legacy. The reason for disableing is that the syntax will change in the near future. https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy

提交回复
热议问题