title: How to add class to the element using Angular's ngFocus directive (or any directive embedded in Ionic Framework) at input in a template?
body: <p>I have a template like this:</p>
  
  <pre><code>    &lt;label class="item item-input"
             ng-class="{'focus':authData.username.focus}"&gt; &lt;--add class here if input:focus
          &lt;span class="input-label"&gt;Username&lt;/span&gt;
          &lt;input type="text"
                 name="username"
                 ng-model="authData.username"
                 ng-focus="" &lt;--check if focus
                 required ng-minlength="5" ng-maxlength="20"&gt;
      &lt;/label&gt;
  </code></pre>
  
  <p>How can I check if input has focus and add a class to label? Is it possible without a external function in controller?</p>