Passing custom object through @Input?

Hi, i’m facing some problem in pass an object to a custom component.
I can pass a string, but not a custom object. It’s probably some silly mistake :flushed:

custom component

import {Component, Input } from '@angular/core';
import {Item} from '../../models/item';
  selector: 'extrato-wrapper',
  templateUrl: 'build/components/extrato-wrapper/extrato-wrapper.html',
export class ExtratoWrapper {
  @Input(param_a) items: Item[];
  constructor() {

item-wrapper.html has a list with ngFor like this.
<button ion-item *ngFor="let item of items>

And home.html
<extrato-wrapper [param_a]=items></extrato-wrapper>

For test purpose, I also include a list with the same object, so I can ensure my object is not null

<extrato-wrapper [param_a]=items></extrato-wrapper>
<ion-list> <!-- testing if my object is null -->
    <button ion-item *ngFor="let extrato of extratos" (click)="gotoDetalhes($event, extrato)">


import { Component } from '@angular/core';
import { NavController, NavParams  } from 'ionic-angular';`
import { ExtratoWrapper } from '../../components/extrato-wrapper/extrato-wrapper';
import { Extrato } from '../../models/item';
import { ExtratoService } from '../../providers/extrato-service/extrato-service';
    templateUrl: 'build/pages/home/home.html',
    directives: [ExtratoWrapper],
    providers: [ExtratoService]
export class HomePage {
    extratos: Extrato[];
    constructor(public nav: NavController, navParams: NavParams, private extratoserv: ExtratoService) {
            .then(extratos => this.extratos = extratos)
            .then(extratos => console.log(this.extratos))

<extrato-wrapper [param_a]="items"></extrato-wrapper>

Thanks, but already tried it before and doesn’t work.

Can I see home.ts where you declare the ‘items’ variable?

@pe1 I edited my post to include home.ts

There is no ‘items’ variable in the home.ts, but we have ‘extractors’ so change a little home.html:

<extrato-wrapper [param_a]="extractors"></extrato-wrapper>

and change type of items in the custom component:

@Input(param_a) items: Extrato[];

Oh, it was a mistake in copy/past to forum :flushed:, but I found the problem.

@Input(param_a) items: Item[];
<extrato-wrapper [items]=“items”>

I was using the same name for my object variable and for the input variable (even using the param_a) , now i changed to this and is working

@Input(param_a) items_in: Item[];
<extrato-wrapper [items]=“items”>

thanks for all help @pe1