DEV Community

DanielFrugoni
DanielFrugoni

Posted on

Passing parameter


title:
description: passing parameter as a image, in angular 7
tags:
(Opc A)
(Opc B)

Opcion A: Works
Opcion B: NO
{
@Component({
selector: 'upload-imagen',
templateUrl: './imagen.component.html',
styleUrls: ['./imagen.component.scss'],
})

export class imageUploadComponent implements OnInit {
@Input() imagen:any;

constructor() {
console.log('Foto:'+this.imagen) shows Undefined
}
}
Cant fine the solution for that

Help is very very welcom

Extra: tmpImage is NOT a path, is the Image comming from json, I can see all the info in the form. So it could that the image is big and the parameter has a limit size ?

Top comments (1)

Collapse
 
danielfrugoni profile image
DanielFrugoni

Solved !!!!