The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

194049 (2) [Avatar] Offline
While processing through chapter 2, i encounterd the following error:
Error: Template parse errors:
Can't bind to 'stock' since it isn't a known property of 'summary'. ("
  <main class="mdl-layout__content" style="padding: 20px;" *ngIf="stocks">
    <summary [ERROR ->][stock]="stocks[0]"></summary>
"): ng:///AppModule/AppComponent.html@10:13

import {Component, Input} from '@angular/core';

  selector: 'app-summary',
  templateUrl: './summary.component.html',
  styleUrls: ['./summary.component.css']

export class SummaryComponent {
    @Input() stock: any;

  isNegative() {
    return (this.stock && this.stock.change < 0);

  isPositive() {
    return (this.stock && this.stock.change > 0);


194049 (2) [Avatar] Offline
Well, I found it: its the app-summary selector smilie
jeremy.wilken (208) [Avatar] Offline
That is right, the selector wasn't found which makes the binding error out. I guess the binding error shows up first, even though it would have also thrown an error on the unknown element.