<html lang="en">
<head>
<meta charset="UTF-8">
<title>Angular input[email] Direktifleri</title>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.min.js"></script>
</head>
<body ng-app="ornekModul">
<script>
angular.module('ornekModul', [])
.controller('ornekController', ['$scope', function($scope) {
$scope.email = {
text: 'ahmet.caglayan@arabirim.com.tr'
};
}]);
</script>
<form name="benimFormum" ng-controller="ornekController">
<label>Emailiniz:
<input type="email" name="input" ng-model="email.text" required>
</label>
<div role="alert">
<span class="hata" ng-show="benimFormum.input.$error.required">
Gerekli!</span>
<span class="hata" ng-show="benimFormum.input.$error.email">
Geçersiz email!</span>
</div>
<tt>text = {{email.text}}</tt><br/>
<tt>benimFormum.input.$valid = {{benimFormum.input.$valid}}</tt><br/>
<tt>benimFormum.input.$error = {{benimFormum.input.$error}}</tt><br/>
<tt>benimFormum.$valid = {{benimFormum.$valid}}</tt><br/>
<tt>benimFormum.$error.required = {{!!benimFormum.$error.required}}</tt><br/>
<tt>benimFormum.$error.email = {{!!benimFormum.$error.email}}</tt><br/>
</form>
</body>
</html>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.