Angularjs complex operation case based on MVC

Source: Internet
Author: User

Angularjs complex operation case based on MVC

1 <!DOCTYPE HTML>2 <HTML>3     <Head>4         <MetaCharSet= "UTF-8">5         <title>angularjs Complex operation case based on MVC</title>6         <Scripttype= "Text/javascript"src=".. /js/angular.min.js "></Script>7     </Head>8     <Body>9         <!--ng-app= "MyApp" defines a module -Ten         <DivNg-app= "MyApp"Ng-controller= "Myctrl"> One             <Div> A                 <!--Ng-model Model Action - -                 <inputtype= "text"name= "Name"Ng-model= "Name" /> -                 <!--provide a button - the                 <inputtype= "button"value= "Empty"Ng-click= "Clearval ()" /> -             </Div> -             <Div> -                 <!--{{}} is equivalent to Ng-bind for data display - + Hello,{{name}} -             </Div> +         </Div> A     </Body> at     <Scripttype= "Text/javascript"> -         //Initialize the MyApp module -         varMyApp=Angular.module ("MyApp",[]); -         //define the controller for the module -         //Dependency Injection, $scope scope object, manipulating the current scope view - Myapp.controller ("Myctrl",["$scope",function($scope) { in             //Initialize the model to assign values - $scope. Name= "you and me, he learns."; to             //provide Clearval Click events at Scope + $scope. Clearval= function(){ -                 //model is set to empty the $scope. Name= "";//empty the contents of the input box *             } $         }]);Panax Notoginseng     </Script> - </HTML>

Angularjs complex operation case based on MVC

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.