title: Bind to nested object in angular
body: <p>Having this component:</p>
  
  <pre><code>export class SearchPageComponent implements OnInit {
      results: Array&lt;ResultsModel&gt; = [];
  
      public constructor(private searchService: SearchPageService) { }
  
      public ngOnInit(): void {
          this.onSearch(new SearchCriteria());
      }
  
      public async onSearch($event: SearchCriteria): Promise&lt;void&gt; {
          this.results = await this.searchService.searchAsync($event);
      }
  }
  </code></pre>
  
  <p>it's template:</p>
  
  <pre><code>&lt;div class="container-fluid"&gt;
      &lt;results-list [itemsList.entries]="results"&gt;&lt;/results-list&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>child component:</p>
  
  <pre><code>export class ResultsListComponent implements OnInit {
      public itemsList: ItemsList&lt;ResultsModel&gt; = new ItemsList&lt;ResultsModel&gt;();
  
      public ngOnInit() {
          this.itemsList.init();
      }
  }
  </code></pre>
  
  <p>the <code>ItemsList</code> class:</p>
  
  <pre><code>export class ItemsList&lt;T&gt; {
      private resultsObserver = new BehaviorSubject&lt;Array&lt;T&gt;&gt;([]);
  
      @Input() public entries: T[] = [];
  
      public set items(value) { this.resultsObserver.next(value); };
  
      public init() {
          this.resultsObserver.subscribe(this.onResults.bind(this));
      }
  
      private onResults(entries: T[]): void {
          this.isLoading = false;
  
          entries.forEach(entry =&gt; this.entries.push(entry));
      }
  }
  </code></pre>
  
  <p>I'd like to know how to pass data to <code>ItemsList.entries</code> property. I would rather keep something like this <code>[itemsList.entries]</code> syntax in the template, but is it even possible?</p>
  
  <p>Using the above code gives me:</p>
  
  <p><code>Can't bind to 'itemsList.entries' since it isn't a known property of 'results-list'.</code></p>
  
  <p>I'm trying to achieve what can be expressed by what <code>[style.color]="whatever"</code> is doing. This works in ng2 I think, why won't my code work?</p>