html5 - Angular2 提示TS1219:Experimental support for decorators ;
PHP中文网
PHP中文网 2017-05-31 10:39:51
0
1
787

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中文网

认证0级讲师

reply all(1)
阿神

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

{
    "compilerOptions": {
        "experimentalDecorators": true
    }
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template