xxxxxxxxxx
1
<!-- Start your project here-->
2
<div style="height: 100vh;">
3
<div class="flex-center flex-column">
4
<h1 class="animated fadeIn mb-4">
5
mdb-file-upload does not display image if it has a querystring in the URL
6
</h1>
7
8
<img src="https://mdbcdn.b-cdn.net/img/Photos/Others/images/89.jpg" />
9
<img src="https://mdbcdn.b-cdn.net/img/Photos/Others/images/89.jpg?sev=2020" />
10
<mdb-file-upload (fileRemoved)="onFileRemove()" (fileAdded)="onFileAdd($event)" [defaultFile]="'https://mdbcdn.b-cdn.net/img/Photos/Others/images/89.jpg'"></mdb-file-upload>
11
<mdb-file-upload (fileRemoved)="onFileRemove()" (fileAdded)="onFileAdd($event)" [defaultFile]="'https://mdbcdn.b-cdn.net/img/Photos/Others/images/89.jpg?sev=2020'"></mdb-file-upload>
12
13
</div>
14
</div>
15
<!-- /Start your project here-->
16
xxxxxxxxxx
1
div {
2
text-align: center;
3
}
4
xxxxxxxxxx
1
import { Component } from "@angular/core";
2
3
@Component({
4
selector: "app-root",
5
templateUrl: "./app.component.html",
6
styleUrls: ["./app.component.scss"]
7
})
8
export class AppComponent {
9
file: File;
10
11
onFileAdd(file: File) {
12
this.file = file;
13
}
14
15
onFileRemove() {
16
this.file = null;
17
}
18
}
19
Console errors: 0