DEV Community

Discussion on: Passing data between nested components with Angular

Collapse
 
danielfrugoni profile image
DanielFrugoni

Hi Stephe !

In my form i Hava this:
(use this img temp so just to check my image is there)

I use the just to see that the info is there.
then I call <upload-image...., with the parameter that you see.
But when I get into :

@Component({
selector: 'upload-imagen',
templateUrl: './imagen.component.html',
styleUrls: ['./imagen.component.scss'],

})

export class imageUploadComponent {
@Input() imagen: any;
....
and do a console.log(this.imagen) can see :undefined
So I guess Im not passing the parameter ok or Im not using (@Input() imagen: any;) the correct way.

Hope you undertand me and thx for your time

Thread Thread
 
chiangs profile image
Stephen Chiang

Hi I can't really debug for you from here... But have you imported input?

Thread Thread
 
danielfrugoni profile image
DanielFrugoni

@Component({
selector: 'upload-imagen', ....

and ...
export class imageUploadComponent {
@Input() imagen: any;

Could it be that passing parameter has a size limit ?

Thx

Thread Thread
 
danielfrugoni profile image
DanielFrugoni

yes