title: Angular child call parent function then parent pass data to child
body: <p>What I want to do is if child component call parent component's function, parent will pass some data to child.
  But the problem now is like in this example, even if the parent's function is called 5 times, as the data passed has no change, the child can't detect.
  What I can to achieve is no matter the data from parent is modified or not, the child can be stilled notified from the parent and has the correct data.</p>
  <p>Child.ts</p>
  <pre><code>@Input() set dataFromParent(v:any){
      console.log(v)
  }
  @Output() callParentFunction = new EventEmitter&lt;any&gt;()
  ngOnInit() {
      for(let i = 0; i&lt; 5;i++){
          this.callParentFunction.emit()
      }
  }
  </code></pre>
  <p>Parent.html</p>
  <pre><code>&lt;app-child (callParentFunction)=&quot;test()&quot; [dataFromParent]=&quot;isData&quot;/&gt;
  </code></pre>
  <p>Parent.ts</p>
  <pre><code>isData = true
  test=()=&gt;{
      this.isData = true
  }
  </code></pre>