Hi guys i'm working with angular and want to call @viewChild in ts file but facing an error "Decorators are not valid here." cant find any specific solution for my problem
I have tried many links regarding this problem including angular documentation, stackoverflow, youtube but not able to find any appropriate solution to my problem
import { Component, OnInit, ViewChild } from '@angular/core';
import * as $ from 'jquery';
@Component({
selector: 'app-upload-card-details',
templateUrl: './upload-card-details.component.html',
styleUrls: ['./upload-card-details.component.css']
})
export class UploadCardDetailsComponent implements OnInit {
@ViewChild(draganddropimage)
constructor() {}
ngOnInit() {}
}
HTML:Code
<div class="modal fade custom-modal-setting" id="drag-and-drop-image" #draganddropimage tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"></div>