Exception: Can't bind to 'ngFor' since it isn't a known native property

后端 未结 13 1664
耶瑟儿~
耶瑟儿~ 2020-12-12 16:35

What am I doing wrong?

import {bootstrap, Component} from \'angular2/angular2\'

@Component({
  selector: \'conf-talks\',
  template: `
13条回答
  •  余生分开走
    2020-12-12 17:24

    Also don't try to use pure TypeScript in this... I wanted to more correspond to for usage and use *ngFor="const filter of filters" and got the ngFor not a known property error. Just replacing const by let is working.

    As @alexander-abakumov said for the of replaced by in.

提交回复
热议问题