复制代码 代码如下: 无标题文档 http://localhost:81/js/jquery.js</a>"><br> </skrip><br> <script src="<a href="http://localhost:81/js/angular.min.js">http://localhost:81/js/angular.min.js</a>"><br> </skrip><br> <body ng-app="app" ng-controller="c"><br> <div dir ng-repeat="item in items" ng-model="m"><br> {{item}} {{m}} <br><br> </div><br> </body><br> <skrip><br> var app = angular.module("app", []);<br> fungsi c($skop){<br> $scope.items = [1,2,2,3,4,5,5];<br> $scope.m = "rentetan";<br> };<br> app.directive("dir",function($parse){<br> kembali {<br> compile : function( $compile ){<br> kembalikan fungsi(s,e,a){<br> //apa .. ..<br> //a.ngModel<br> //用$("xxx").scope.xx = model<br> //tugaskan 分配<br> //console.log( $parse( a.ngModel ).assign(s,"sdfs__________newValue__________dfd") )<br> s.m = "<a href="mailto:sdfs____#@%24#@%24#@%24@#%24__dfd">sdfs____#@$#@$#@$@#$__dfd</a>这两个效果一摸一样";<br> }<br> }<br> }<br> });<br> </skrip><br> </html><br> </div> <p>以上就是关于angularJS 中$scope方法使用指南的全部内容了,希望大家能够喜欢>。</p>