ANGULARJS Service Provider

Source: Internet
Author: User

<! DOCTYPE html>"myApp">"Content-type"Content="text/html; Charset=utf-8"><title> Untitled Document </title><style>#parent div{width:300px; height:500px; border:1px # thesolid; margin:20px;} #parent ul{width:200px; position:fixed; Top0; Right0;}</style><script src="Angular.min.js"></script><script>//Vendor: Initialize the relevant configuration for the corresponding servicevarM1 = Angular.module ('myApp',[]);//Interpolateprovider is a service provider for interpolate (interpolation), and Scopeprovider is a service provider for scope. The operation of the supplier is to be written in CONFIG. M1.config (['$interpolateProvider', Function ($interpolateProvider) {//Do not use {{}}. $interpolateProvider. Startsymbol ('@@'); $interpolateProvider. Endsymbol ('@@'); }]); M1.controller ('Aaa',['$scope','$interpolate', function ($scope, $interpolate) {$scope. $watch ('Body', Function (newbody) {if(newbody) {vartemp =$interpolate (newbody); $scope. Showtext=Temp ({name: $scope. name});    }            }); }]);</script>"NaN"> <input type="text"Ng-model="name"> <textarea ng-model="Body"> </textarea> <p>@@[email protected]@</p></div></body>
<! DOCTYPE html>"myApp">"Content-type"Content="text/html; Charset=utf-8"><title> Untitled Document </title><style>#parent div{width:300px; height:500px; border:1px # thesolid; margin:20px;} #parent ul{width:200px; position:fixed; Top0; Right0;}</style><script src="Angular.min.js"></script><script>varM1 = Angular.module ('myApp',[]);//$logProvider is a supplier of $log services. M1.config (['$interpolateProvider','$logProvider', function ($interpolateProvider, $logProvider) {$logProvider. debugenabled (false);//If you disable debug, you cannot print hello below.}]); M1.controller ('Aaa',['$scope','$log', function ($scope, $log) {$log. Debug ('Hello');}]);</script>"Aaa"> </div></body>
<! DOCTYPE html>"myApp">"Content-type"Content="text/html; Charset=utf-8"><title> Untitled Document </title><style>#parent div{width:300px; height:500px; border:1px # thesolid; margin:20px;} #parent ul{width:200px; position:fixed; Top0; Right0;}</style><script src="Angular.min.js"></script><script>varM1 = Angular.module ('myApp',[]);//$anchorScrollProvider is a service provider for Anchorscroll,M1.config (['$anchorScrollProvider', Function ($anchorScrollProvider) {$anchorScrollProvider. disableautoscrolling ();//prevent anchor jumps. }]); M1.controller ('Aaa',['$scope','$location','$anchorScroll', function ($scope, $location, $anchorScroll) {$scope. change=function (ID) {$location. hash (ID);    $anchorScroll (); };}]);</script>"Parent"Ng-controller="Aaa"> <ul> <li ng-repeat="ID in [1,2,3,4,5]"ng-click="Change (' div ' +id)">{{id}}aaaaaaaaaa</li> </ul> <div ng-repeat="ID in [1,2,3,4,5]"Ng-attr-id="Div{{id}}">{{id}}</div></div></body>

ANGULARJS Service Provider

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.