I am trying to validate that a input type email
is equal to the other but I have not been able to achieve it, is it possible to validate it from the view?
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope, $http) {
});
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
<form action="" name="formEmails">
<label>Email</label>
<input type="email" required ng-model="email" name="email"/>
<label>Confirmar Email</label>
<input type="email" ng-required="emailConfirm" ng-model="emailConfirm" name="emailConfirm"/>
<button type="button" ng-disabled="formEmails.$invalid">Validar</button>
</form>
</body>
</html>