mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The purpose of the changes is to clean all markdown to match a single pedantic style.
* To ensure all changes in style are properly separated.
* To ensure all styled content aligns to nearest 4-character-tab.
* To ensure all code blocks use the Angular `<code-example>` or `<code-tab>` elements.
* To ensure all markdown exists outside of html tags.
* To ensure all images use the Angular style for `<img>` elements.
* To ensure that all smart punctuation is replaced or removed.
```text
’, ’, “, ”, –, —, …
```
* To ensure all content does not conflict with the following reserved characters.
```text
@, $, *, &, #, |, <, >,
```
* To ensure all content displays using html entities.
The following changes were made to files in the following directory.
```text
aio/content
```
The target files were markdown files.
The list of excluded files:
```text
.browserslistrc, .css, .conf, .editorconfig, .gitignore, .html, .js, .json, .sh, .svg, .ts, .txt, .xlf,
```
PR Close #45325
31 lines
1.2 KiB
Markdown
31 lines
1.2 KiB
Markdown
@name Selector Collision
|
|
@category runtime
|
|
@videoUrl https://www.youtube.com/embed/z_3Z5mOm59I
|
|
@shortDescription Multiple components match with the same tagname
|
|
|
|
@description
|
|
Two or more components use the same [element selector](guide/component-overview#specifying-a-components-css-selector). Because there can only be a single component associated with an element, selectors must be unique strings to prevent ambiguity for Angular.
|
|
|
|
@debugging
|
|
Use the element name from the error message to search for places where you're using the same [selector declaration](guide/architecture-components) in your codebase:
|
|
|
|
<code-example format="typescript" language="typescript">
|
|
|
|
@Component({
|
|
selector: 'YOUR_STRING',
|
|
…
|
|
})
|
|
|
|
</code-example>
|
|
|
|
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](guide/styleguide#component-selectors) for your selectors to prevent collisions.
|
|
|
|
<!-- links -->
|
|
|
|
<!-- external links -->
|
|
|
|
<!-- end links -->
|
|
|
|
@reviewed 2022-02-28
|