為什么會(huì)有一個(gè)id=7的scope?有什么用?<body ng-app="scopeExample"> <div class="show-scope-demo"> <div ng-controller="GreetController"> Hello {{name}}! <div ng-controller="ListController"> <ol> <li ng-repeat="name in names">{{name}} from {{department}}</li> </ol> <input ng-model="name">{{name}} <div ng-include src="'child.html'"> </div> </div> </div> </div> </body> child.html<div ng-controller="ChildController"> <input ng-model="name"></div>
為什么使用ng-include外層會(huì)多一個(gè)作用域?
炎炎設(shè)計(jì)
2018-12-04 21:19:30