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

  • Autodesk 3ds Max Learning Channel

    Autodesk 3ds

    23 HAZİRAN 2010
  • Damian Winter

    Damian Winte

    27 ŞUBAT 2007
  • lissaandbeauty

    lissaandbeau

    24 Aralık 2011