Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="test">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body ng-controller="testController">
  <form name="myForm"> 
  
    <input style="width: 95%" name="NewInvitations" type="email" ng-model="newInvitations" required />
                <div ng-show="NewInvitationsError" style="color: red"> {{NewInvitationsError}}</div>
                <button  class="btn btn-success" ng-click="sendInvitations()">Send Invitations</button>
    
  </form>
</body>
</html>
 
angular.module('test',[]).controller('testController', function($scope){
  
  $scope.sendInvitations = function(){
    debugger;//
    var error = $scope.myForm.NewInvitations.$error; 
    console.log('sent');  
    console.log(error );
  };
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers