title: Is there a way to bind a property to a child component and use it in a method in the child component?
body: <p>I have a property binded into a child component and I want to use that property as a value in a method in the child component.</p>
  
  <p>I got the child component to display the property (estate.name) in the template, but I was getting a console error that the "id" property is undefined in the getEstateBlocks() method in the child component. </p>
  
  <p>This is the template of the parent component:</p>
  
  <pre><code>&lt;h3&gt;Managed Estates&lt;/h3&gt;
  &lt;div&gt;
    &lt;ul&gt;
    &lt;li *ngFor="let estate of estates" (click)="onSelectEstate(estate)"&gt;
      &lt;div&gt;
        &lt;h4&gt;{{estate.name}}&lt;/h4&gt;
      &lt;/div&gt;
    &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;app-estate-blocks [estate]="selectedEstate"&gt;&lt;/app-estate-blocks&gt;
  </code></pre>
  
  <p>this is the onSelectEstate() method in the parent component:</p>
  
  <pre><code>onSelectEstate(estate: Estate) {
      this.selectedEstate = estate;
    }
  </code></pre>
  
  <p>This is the child component template:</p>
  
  <pre><code>&lt;div *ngIf="estate"&gt;
    &lt;h2&gt;Blocks in {{estate.name}}&lt;/h2&gt;
  &lt;ul &gt;
    &lt;li *ngFor="let block of blocks"&gt;
      &lt;a &gt;
        &lt;span&gt;BLOCK&lt;/span&gt; {{block.blockName | uppercase}}
      &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is the code in the child component:</p>
  
  <pre><code>@Component({
    selector: 'app-estate-blocks',
    templateUrl: './estate-blocks.component.html',
    styleUrls: ['./estate-blocks.component.css']
  })
  export class EstateBlocksComponent implements OnInit {
  
    @Input() estate: Estate;
    blocks: Block[];
  
    constructor(private estateService: EstatesService) { }
  
    ngOnInit() {
      this.getBlocks();
    }
  
    getBlocks() {
      return this.estateService.getEstateBlocks(this.estate.id)
        .subscribe(blocks =&gt; this.blocks = blocks);
    }
  </code></pre>
  
  <p>I expected the blocks of a selected estate to be displayed below the estate list when an estate is clicked.</p>