How to Clear Contents of an observableArray That was Populated from Previous Visits to a View

前端 未结 4 1135
猫巷女王i
猫巷女王i 2021-02-06 20:59

I have a Single Page Application that uses knockout for the data binding. The CAApproval.html view in my single page application has an observeablearray named AllCertificates i

4条回答
  •  -上瘾入骨i
    2021-02-06 21:38

    to initialize an array variable

    self.allCertificates = ko.observableArray([]) 
    

    to remove all the value of array

    self.allCertificates.removeAll()
    

提交回复
热议问题