AK
Size: a a a
AK
AK
AK
DN
AK
DN
DN
DN
AK
AK
LK
<input type="file" on-change-file fn="$ctrl.onFileChange(event)" accept="image/*" id="{{$ctrl.uploadImageClass}}" class="hide-input"/>const file = event.currentTarget.files[0];
const reader = new FileReader();
reader.onload = event => {
const image: HTMLImageElement = new Image();
image.src = event.target['result'];
image.onload = () => this.imageOnLoad(image);
};
reader.readAsDataURL(file);
DN
DN
<input type="file" on-change-file fn="$ctrl.onFileChange(event)" accept="image/*" id="{{$ctrl.uploadImageClass}}" class="hide-input"/>const file = event.currentTarget.files[0];
const reader = new FileReader();
reader.onload = event => {
const image: HTMLImageElement = new Image();
image.src = event.target['result'];
image.onload = () => this.imageOnLoad(image);
};
reader.readAsDataURL(file);
on-change-file fn="$ctrl.onFileChange(event)"LK
on-change-file fn="$ctrl.onFileChange(event)"AK
var fd = new FormData();
fd.append('file', file);
$http.post(uploadUrl, fd
N👩
var fd = new FormData();
fd.append('file', file);
$http.post(uploadUrl, fd
AK
on-change-file fn="$ctrl.onFileChange(event)"LK
on-change-file fn="$ctrl.onFileChange(event)"export default function ChangeFileDirective() {
return {
restrict: 'A',
scope: {
fn: '&'
},
link: (scope, element, attrs) => {
element.bind('change', (event) => {
scope.fn({event: event})
});
}
}
}