title: problem typescript execution order failed
body: <p>I am calling a function to save some data in a first time from an object and apply my changes in the second time ( make this object empty ), the problem is I cant get the object's content</p>
  
  <p>calling the function from template:</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-html lang-html prettyprint-override"><code>&lt;button class="btn btn-default myButton" (click)="onChangePartenaire()"
          [ngStyle]="!partenaireDisabled &amp;&amp; {'background'  : 'gray'}"&gt;
          Creation
  &lt;/button&gt;</code></pre>
  </div>
  </div>
  </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>ngOnInit() {
  
   ............
   
  this.apporteur = this.simulation.apporteur;
  
  .............
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <pre><code>onChangePartenaire() { console.log('this.apporteur',this.apporteur);
          this.partInitial = this.apporteur;
          this.partenaireDisabled = !this.partenaireDisabled;
  
          if(!this.partenaireDisabled) { //set this.apporteur to this.partInitial before and continue
              this.apporteur.simulation_info_apporteur_nom = '';
              this.apporteur.simulation_info_vendeur.simulation_info_vendeur_nom = '';
              this.apporteur.simulation_info_vendeur.simulation_info_vendeur_prenom = '';
              this.apporteur.simulation_info_vendeur.simulation_info_vendeur_email = '';
              this.apporteur.simulation_info_vendeur.simulation_info_vendeur_tel = '';
          } else {
              this.apporteur = this.partInitial;
          }
  
      }
  </code></pre>
  
  <p>I try this but no result :</p>
  
  <pre><code>onChangePartenaire() { console.log('this.apporteur',this.apporteur);
          this.partInitial = this.apporteur;
          this.partenaireDisabled = !this.partenaireDisabled;
  
          let _this = this;
          setTimeout( function () {
              if(!_this.partenaireDisabled) {
                  _this.apporteur.simulation_info_apporteur_nom = '';
                  _this.apporteur.simulation_info_vendeur.simulation_info_vendeur_nom = '';
                  _this.apporteur.simulation_info_vendeur.simulation_info_vendeur_prenom = '';
                  _this.apporteur.simulation_info_vendeur.simulation_info_vendeur_email = '';
                  _this.apporteur.simulation_info_vendeur.simulation_info_vendeur_tel = '';
              } else {
                  _this.apporteur = _this.partInitial;
              }
          }, 100);
  
  
      }
  </code></pre>
  
  <p>thanks for helping me.</p>