<! DOCTYPE html> for= "Ipt_name" > User name </label> <input ng-model= "Data.name" type= "text" id= "Ipt_name" > <span ng-bi Nd= "Data.errorMsg.name" ></span> </div> <div> <label for= "Ipt_password" > Password </label> <input ng-model= "Data.password" type= "password" id= "Ipt_password" > < ;/div> <div> <label for= "Ipt_age" > Age </label> <input ng-model= "data.age" type= "number" id= "Ipt_age" > </div> < Div> <label for= "Ipt_phone" > Mobile </label> <input ng-model= "Data.phone" type= "tel" id= "Ipt_phone" > </div> & lt;div> <button ng-click= "Actions.submit ()" > Registration </button> </div></div><script>//app is application abbreviation, application is the meaning of the application varApp = Angular.module (' S1.app ', []); App.run (function($rootScope) {//data is what it means. vardata = $rootScope. Data = {}; Data.name= ' '; Data.password= ' '; Data.age= 0; Data.phone= ' '; Data.errormsg= {}; //actions are the meaning of actions varactions = $rootScope. Actions = {}; Actions.submit=function () { varUserInfo = {}; if(Data.name = = "") {Data.errorMsg.name= ' User name cannot be null '; return; } userinfo.name=Data.name; Userinfo.password=Data.password; Userinfo.age=Data.age; Userinfo.phone=Data.phone; //get the data we want from the data object and do the commit (now we don't have a server, just a log)Console.log (userinfo); } })</script></body>Use Angular.js to get information from form forms