Why is the button not disabled?
var mainApp = angular.module('mainApp', []);
mainApp.controller('mainController', function ($scope) {
$scope.form = {
login: ''
};
});
<form ng-controller="LoginAppCtrl as lc" ng-app="MTApp">
<div class="login">
<h1>LOG IN</h1>
</div>
<div>
<div>User Name :</div>
<div>
<input type="text" name="tbUserName" required ng-model="lc.request.user">
</div>
</div>
<div>
<div>Password :</div>
<div>
<input type="text" name="tbPassword" required ng-model="lc.request.password">
</div>
</div>
<div>
<div>
<button ng-click="lc.submitRequest()" ng-disabled="lc.request.user == '' || lc.request.password == '' ">Sign In</button>
</div>
</div>
</form>
I'm a beginner in Angular JS and I'm attempting to create a basic login form. If the login is successful, another form will be shown, if not, the login form will remain. Can someone provide some assistance? I am in need of some basic tutorials.