Reload image on change
This commit is contained in:
@@ -56,7 +56,7 @@ export class EditImageModalComponent implements OnInit {
|
||||
this.imageService.putImage(this.endpointUrl,this.imageService.b64toBlob(body,"image/jpeg")).subscribe(() => {
|
||||
this.changed.emit({});
|
||||
});
|
||||
(this.modal as any).close('Save click');
|
||||
this,this.modalService.dismissAll("Save");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Component,Input ,ViewChild,ElementRef} from '@angular/core';
|
||||
import { Component,Input ,ViewChild,ElementRef,ChangeDetectorRef} from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
|
||||
import { IListItem } from '../../models/list.item';
|
||||
@@ -19,7 +19,7 @@ import { AppConfig } from "../../shared/app.config";
|
||||
@ViewChild('thumbnail') el:ElementRef;
|
||||
@ViewChild('modal') modal:EditImageModalComponent;
|
||||
|
||||
constructor(public store: Store<commonReducers.State>, public itemTypeService: ItemTypeService,public appConfig: AppConfig,) {
|
||||
constructor(public store: Store<commonReducers.State>, public itemTypeService: ItemTypeService,public appConfig: AppConfig,private changeDetector:ChangeDetectorRef) {
|
||||
}
|
||||
|
||||
getThumbnailUrl(item:IListItem):string {
|
||||
@@ -53,6 +53,9 @@ import { AppConfig } from "../../shared/app.config";
|
||||
}
|
||||
|
||||
onChanged() {
|
||||
console.log("changed");
|
||||
if(this.item) {
|
||||
this.item.updated = new Date(new Date().getTime()).toISOString();
|
||||
this.changeDetector.detectChanges();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user