How can I check if the input field is not empty
<p>I need to check that my input field is not empty.</p>

<p>I tried the following but it's not working.</p>

<p>JavaScript:</p>

<pre><code>if ($scope.currentUser.Login.length != 0) {
    console.log($scope.currentUser.login.length);
}
</code></pre>

<p>HTML:</p>

<pre><code>&lt;div class="cClearFloat cInputSpace"&gt;
    &lt;input placeholder="login" ng-model="currentUser.login"&gt;
&lt;/div&gt;
</code></pre>

<p>Can someone help me?</p>