title: How to send data from a component which is calling another component angular
body: <p>i have a problem, i have a component called <code>customers.component</code></p>
  <p>Here is the <code>customers.component.ts</code>:</p>
  <pre><code>@Component({
    selector: 'app-customer',
    templateUrl: './customer.component.html',
    styleUrls: ['./customer.component.css']
  })
  
  export class CustomerComponent implements OnInit {
  
    customers: any;
  
    constructor(private titleService: Title) {
        this.titleService.setTitle(this.title);
        this.getCostumers();
     }
  </code></pre>
  <p>In the html of <code>customers.component</code> view i am calling another component called <code>details-customers.component</code> through a for looping inside of the array <code>customers</code></p>
  <pre><code>&lt;div id=&quot;listas&quot; class=&quot;listas&quot;&gt;
      &lt;div class=&quot;col-lg-12 col-md-12 col-sm-12 col-12 fila_lista&quot; *ngFor=&quot;let customer of customers&quot;&gt;
          &lt;app-details-customer&gt;&lt;/app-details-customer&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>The think that i want to do is send the variable customer which is the current variable of the actual position of the loop, To do something like this in my another component view <code>details-customers.component.html</code>:</p>
  <pre><code>&lt;div class=&quot;row&quot;&gt;
      &lt;div class=&quot;col-lg-3 col-md-6 col-sm-6 col-12 auto_mrg&quot;&gt;
          &lt;span&gt;{{customer.name_owner}}&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class=&quot;col-lg-2 col-md-6 col-sm-6 col-12 auto_mrg &quot;&gt;
          &lt;span&gt;Tel: +{{customer.country_p.phone_code}} {{customer.phone}}&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class=&quot;col-lg-4 col-md-12 col-sm-12 col-12 auto_mrg &quot;&gt;
          &lt;span&gt;{{customer.country_p.country_name}}, {{customer.city_p.city_name}} - {{customer.state_p.state_name}}&lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>In other words, is to send the actual variable of the loop to the component that i am calling...</p>
  <p>There is a way to do this?, thank you!</p>