Home
Run >
<!DOCTYPE html> <html> <head> <!-- www.techstrikers.com --> <title>Email Test Sample</title> <script SRC="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script> <script src="https://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.6.0.js"></script> <script> var app = angular.module('emailInputExample', []) app.run(function($rootScope){ $rootScope.angular = angular; }) app.controller('EmailController', ['$scope', function($scope) { $scope.example = { email: 'jimi@domain.com' }; }]); </script> </head> <body style="background-color:#DDE4E9;"> <fieldset style="background-color:#DDE4E9;"> <legend>AngulerJS Input Type Email Example</legend> <div ng-app="emailInputExample"> <form name="myForm" ng-controller="EmailController"> <label for="exampleInput">Enter Email</label> <input type="email" name="input" ng-model="example.email" required /> <p style="font-family:Arial;color:red;background:steelblue;padding:3px;width:350px;" ng-if='!myForm.input.$valid'>Enter Valid Email</p> </form> </div> </fieldset> </body> </html>