title: Using Observables to propagate changes in Angular 2
body: <p>I have two components, a Parent and a Child:</p>
  
  <pre><code>// Parent Directive
  @Component({
     selector: 'parent-directive',
     template: `
      &lt;button (click)="nextVal($event)"&gt;&lt;/button&gt;
      &lt;button (click)="prevVal($event)"&gt;&lt;/button&gt;
      &lt;child-directive [content]="myValue"&gt;&lt;/child-directive&gt;`,
     directives: [ChildDirective]
  })
  export class ParentDirective {
      public myValue : string;
  
      constructor() {this.myValue = "Hello";}
  
      nextVal() {this.myValue = "Next";}
  
      prevVal() {this.myValue = "Prev";}
  }
  </code></pre>
  
  <p>This is the child directive:</p>
  
  <pre><code>// Child directive
  type ObservableContent = Observable&lt;string&gt;;
  
  @Component({
      selector: 'child-directive',
      template: `&lt;div&gt;&lt;/div&gt;`
  })
  export class ChildDirective {
      @Input() content : ObservableContent;
      subscription : Subscription;
  
      constructor() {
          // I instantiate the content property as an observer. I want to see if it logs anything.
          this.content = new Observable&lt;string&gt;(ob =&gt; {console.log('constructor', ob)});
  
          // I'm trying to get the propagated values here.
          this.subscription = this.content.subscribe(value =&gt; { console.log('value', value);});
      }
  }
  </code></pre>
  
  <p>Let me break down what I'm trying to do here. I have a child component nested in parent component. The parent has two buttons, <code>next</code> and <code>prev</code>, which when clicked change a property bound to the scope of the parent. </p>
  
  <p>The child has another property, <code>content</code> that is bound to the <code>myValue</code> scope property of the parent. When I update <code>myValue</code> in the parent, I want the <code>content</code> property of the the child to change. However when I try to subscribe to that value the subscription listener is never called. What am I doing wrong?</p>