NG0300: Multiple components match with the same tagname

From Get docs
< Errors ListAngular/docs/11/errors/ng0300


NG0300: Multiple components match with the same tagname


Description

Two or more components use the same element selector. Because there can only be a single component associated with an element, selectors must be unique strings to prevent ambiguity for Angular.

Debugging the error

Use the element name from the error message to search for places where you’re using the same selector declaration in your codebase:

@Component({
  selector: 'YOUR_STRING',
  ...
})

Ensure that each component has a unique CSS selector. This will guarantee that Angular renders the component you expect.

If you’re having trouble finding multiple components with this selector tag name, check for components from imported component libraries, such as Angular Material. Make sure you're following the best practices for your selectors to prevent collisions.


© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v11.angular.io/errors/NG0300