title: Pass JS variable across mouseenter event from jquery in angular2 app
body: <p>I have trouble witch function below:</p>
  
  <pre><code>inactive() { 
          let target = $('.album__item--cover-container');
          var leave:boolean;
          target.mouseleave(function() {
              leave = true;
              console.log("LEAVE MOUSEENTER: ", leave);
          });
          console.log("LEAVE: ", leave);
          if (leave) {
              console.log("LEAVE CONDITION: ", leave);
              this.flyOut = 'inactive';
          }
          console.log(this.flyOut); 
      }
  </code></pre>
  
  <p>I don't know wht log <code>"LEAVE MOUSEENTER"</code> is true, and after exit from mouse event log <code>"LEAVE</code>" is <code>undefined</code>. I can't declate <code>this.flyOut = true</code> in this event function. Please someone helop me, and explain why  this behaviour goes that way?</p>
  
  <p>Regards
  Greg</p>