title: How to refresh a part of the page view without refreshing the entire page in angular on a click event?
body: <p>I am building a chat application using Angular. I have two components for the chat. One for each user. I am using a radio button component which creates a new message as radio button. The user selects an option. Once the user clicks on submit button the radio button message is edited and a new message is printed with the option selected by the user. </p>
  
  <p>You can see the demonstration in the plunker below. If user1 creates the radio message and submits the option in the same view, it works as expected. But if user1 creates the radio message and user2 submits the option, then the radio button message is not edited but only generates a new message with the option selected. </p>
  
  <p>The problem I am facing here is that I am unable to refresh the view on the click event. This will display the edited radio button message by removing the options to select.</p>
  
  <p>There is an API available in Angular: ChangeDetection.
  It goes something like this: <a href="https://blog.thoughtram.io/angular/2016/02/22/angular-2-change-detection-explained.html" rel="nofollow noreferrer">ANGULAR CHANGE DETECTION</a></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>edit(message: Message): void {
          let result = JSON.stringify(message);
          if (!result) {
              return;
          }
          this.appService.update(this.message)
              .then(() =&gt; {
                  return null;
              });
      }</code></pre>
  </div>
  </div>
  </p>
  
  <p>But I am unable to use this API on click event.</p>
  
  <p>Plunker for the same is attached: <a href="https://plnkr.co/edit/wYiXu7?p=info" rel="nofollow noreferrer">Angular chat application</a></p>
  
  <p>Is there any other way or work around to get this working?
  Feel free to fork the plunker code and edit if needed.</p>