在Angular 2中,函数装饰器不起作用

时间:2016-05-06 09:05:07

标签: angular

@Component({
  selector: 'my-app',
  template: `
    <ul>
      <li *ngFor="#item of items">{{item.name}}</li>
    </ul>
  `
})

1 个答案:

答案 0 :(得分:2)

tsconfig.json

中设置此项
{ 
"compilerOptions": 
   { 
     "emitDecoratorMetadata": true 
  }
}