Angularjs Record Learning 02

Source: Internet
Author: User

<!DOCTYPE HTML><HTMLNg-app= "MyApp">   <Head>   <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" />      <Scriptsrc= "Js/angular.js"></Script>       <Script>  //Controller Registration   varMyApp=Angular.module ("MyApp", []). Controller ("TestController", function($scope) {$scope. Modelreset= function() {$scope. FirstName= "1111"; $scope. LastName= "LWW"; $scope. Email= "[email protected]"; }    });</Script>   </Head>   <Body>$dirty: The specified value has been changed<BR/>$invalid: The status of this value is not valid<BR/>$error: Point out the exact error<BR/>$dirty and $invalid flags are done to verify the way. Prohibit any browser-specific validation using the Novalidate form declaration<BR/>Ng-include: Fragment loaded in HTML<BR/>The ng-view tag simply creates a placeholder, which is a corresponding view (HTML or ng-template view)<BR/>the ng-template directive is used to create an HTML view that uses the script tag. It contains a view "id" property that is used by the $routeprovider map controller. <BR/><span>Model Nine</span><BR/><DivNg-controller= "TestController"><inputname= "FirstName"type= "text"Ng-model= "FirstName"Required><inputname= "LastName"type= "text"Ng-model= "LastName"Required><inputname= "Email"type= "Email"Ng-model= "Email"Required><ButtonNg-click= "Modelreset ()">Reset</Button></Div>   </Body></HTML>

Angularjs Record Learning 02

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.