We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Initializing uploadObj

What's the best way to initialize:  
public uploadObj: UploaderComponent; 

I tried:
public uploadObj: UploaderComponent | null = null; (problems!)
public uploadObj: UploaderComponent = new UploadComponent(); (fails)

Using angular 14.  Thanks!

1 Reply

SP Sureshkumar P Syncfusion Team October 12, 2022 05:33 AM


We suggest you use the below code to initialize the component instance in the angular 14 application.

Find the code example:


<ejs-uploader #defaultupload  (created)="componentCreated($event)"></ejs-uploader>




export class AppComponent {


  public uploadObj!: UploaderComponent;







Find the sample in the attachment:

Note: If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Sureshkumar P

Attachment: uploader_9013ddb4.zip

Live Chat Icon For mobile
Up arrow icon