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?
The Decorators must come directly before an exported class for example:
@Component({ ... }) export class someComponent{}
this goes the same for @Pipe
@Directive
@Injectable
and @NgModule
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With