2014-08-17

Google AngularJS Tutorial 3 重點

在 AngularJS Tutorial 3 中主要介紹一個Repeater指令: ng-repeat
他處理了phones Array讓所有的phone 顯示在List中,
同時在參數中提供一個 filter 過濾器的參數:
ng-repeat="phone in phones | filter:query"
這參數後面指定了query 變數來與頁面來作資料連結data-binding.
所以在頁面數入框輸入過濾字串,就可以改變 List 的顯示內容.
Live Demo: http://angular.github.com/angular-phonecat/step-3/app
原文:
3 - Filtering Repeaters

沒有留言:

張貼留言