Home  >  Q&A  >  body text

html5 - Angular2 提示TS1219:Experimental support for decorators ;

1. Use angular2 and develop using TypeScript language;
2. Compilation error: TS1219: Experimental support for decorators is a feature that is subject to change in a future release.
3. Texture:

4. Moreover, I have a similar set of code in other projects, but it will not compile and report errors. I can't find the difference at the moment. Has anyone encountered similar problems?

PHP中文网PHP中文网2697 days ago733

reply all(1)I'll reply

  • 阿神

    阿神2017-05-31 10:41:51

    Add the following configuration in the tsconfig.json configuration file:

    {
        "compilerOptions": {
            "experimentalDecorators": true
        }
    }

    reply
    0
  • Cancelreply