SORU
14 AĞUSTOS 2012, Salı


Birden çok kapsam $nitelikler izle

Bir şekilde birden fazla nesne $watch kullanarak olayları abone olmak için var

E. g.

$scope.$watch('item1, item2', function () { });

CEVAP
20 HAZİRAN 2013, PERŞEMBE


AngularJS $watchCollection kullanabilirsiniz 1.1.4 ile başlayan:

$scope.$watchCollection('[item1, item2]', function(newValues, oldValues){
    // do stuff here
    // newValues and oldValues contain the new and respectively old value
    // of the observed collection array
});

Plunker örnek here

Belgeleri 7**

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Break

    Break

    10 Aralık 2005
  • fast2hell

    fast2hell

    16 AĞUSTOS 2006
  • LatinNinja99

    LatinNinja99

    28 EKİM 2011