讀docs tutorial的模型,模板下。下面是從應用程序所採取的代碼/ index.html中NG-模型的角度範圍來篩選不同的作用域
是否角允許範圍的同級的橫能見度?
它是如何將數據命名查詢是在範圍1可用在範圍2中的濾波器是兄弟姐妹,而不是父母範圍?謝謝。
<div class="container-fluid">
<div class="row">
<div class="col-md-2"> //-----------scope 1 -----------------
<!--Sidebar content-->
Search: <input ng-model="query">
</div>
<div class="col-md-10"> //-----------scope 2 -----------------
<!--Body content-->
<ul class="phones">
<li ng-repeat="phone in phones | filter:query">
{{phone.name}}
<p>{{phone.snippet}}</p>
</li>
</ul>
</div>
</div>
</div>