July 2019
Intermediate to advanced
416 pages
10h 6m
English
Now that we have a working preview service, we can use it in our dialog. In order to use it, we are going to pass it into our constructor. As the service is injectable, we can let Angular take care of injecting it for us as long as we add an appropriate reference in our constructor. At the same time, we are going to add in a reference to the dialog itself, as well as a set of declarations that will be used in the corresponding HTML template:
protected imageSource: IPictureModel | null;protected message: any;protected description: string;protected tags: string;constructor( private dialog: MatDialogRef<FileuploadComponent>, private preview: FilePreviewService) { }
Read now
Unlock full access