Component id generation collision detected

host: {‘collision-id’: ‘gallery-1’},

use different different id like:
gallery-1
gallery-2

import { Component, ElementRef, Input, ViewChild } from ‘@angular/core’;

@Component({
selector: ‘app-gallery’,
templateUrl: ‘./gallery.component.html’,…


This content originally appeared on DEV Community and was authored by Faisal Ahmed

host: {'collision-id': 'gallery-1'},

use different different id like:
gallery-1
gallery-2

import { Component, ElementRef, Input, ViewChild } from '@angular/core';

@Component({
  selector: 'app-gallery',
  templateUrl: './gallery.component.html',
  styleUrls: ['./gallery.component.scss'],
  host: {'collision-id': 'gallery-1'},
})
export class GalleryComponent {
  @ViewChild('fullScreen') elem!: ElementRef;
  @Input() galleryData!: any[];


This content originally appeared on DEV Community and was authored by Faisal Ahmed


Print Share Comment Cite Upload Translate Updates
APA

Faisal Ahmed | Sciencx (2024-06-23T13:51:47+00:00) Component id generation collision detected. Retrieved from https://www.scien.cx/2024/06/23/component-id-generation-collision-detected/

MLA
" » Component id generation collision detected." Faisal Ahmed | Sciencx - Sunday June 23, 2024, https://www.scien.cx/2024/06/23/component-id-generation-collision-detected/
HARVARD
Faisal Ahmed | Sciencx Sunday June 23, 2024 » Component id generation collision detected., viewed ,<https://www.scien.cx/2024/06/23/component-id-generation-collision-detected/>
VANCOUVER
Faisal Ahmed | Sciencx - » Component id generation collision detected. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/23/component-id-generation-collision-detected/
CHICAGO
" » Component id generation collision detected." Faisal Ahmed | Sciencx - Accessed . https://www.scien.cx/2024/06/23/component-id-generation-collision-detected/
IEEE
" » Component id generation collision detected." Faisal Ahmed | Sciencx [Online]. Available: https://www.scien.cx/2024/06/23/component-id-generation-collision-detected/. [Accessed: ]
rf:citation
» Component id generation collision detected | Faisal Ahmed | Sciencx | https://www.scien.cx/2024/06/23/component-id-generation-collision-detected/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.