ts1206 decorators are not valid here, Angular 2

Discussão em 'Angular' iniciado por Elior Sastiel, Dezembro 28, 2024.

  1. I started to program Angular 2 and I stuck with an error:


    ts1206 decorators are not valid here
    ​

    @Component({ // ts1206 decorators are not valid here
    selector: 'my-app',
    moduleId: module.id,
    templateUrl: 'app.component.html',
    styleUrls: ['app.component.css']
    })


    Update:

    My tsconfig.json:

    {
    "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": true,
    "suppressImplicitAnyIndexErrors": true
    }
    }


    what can I do with it?

    Continue reading...

Compartilhe esta Página