Angular_More than one component matched on this element.

版权声明:本文为Martin原创文章,未经Martin允许不得转载。 https://blog.csdn.net/qq_36279445/article/details/81906376

core.es5.js:1020 ERROR Error: Uncaught (in promise): Error: Template parse errors:
More than one component matched on this element.
Make sure that only one component's selector can match a given element.
Conflicting components: FooterComponent,FooterComponent ("
    </div>
  </ng-template>
[ERROR ->]<appc-footer (onButtonClick)="onFooterButtonClick($event)" [type]="'putaway'">
</appc-footer>
 

@Component({
  selector: 'footer',
  styleUrls: ['./footer.component.scss'],
  templateUrl: './footer.component.html'
})

这里的selector 和别的地方的重名了。

猜你喜欢

转载自blog.csdn.net/qq_36279445/article/details/81906376