changing value of ko.observable

后端 未结 2 1602
日久生厌
日久生厌 2021-01-01 11:29

I have a ko.observable property of an object called \"totalLength\". While using application I would like to physically amend new value to this property. How can I do that?<

相关标签:
2条回答
  • 2021-01-01 11:45

    ko.observable is a function so you need to set the value like this feature.totalLength(10).

    0 讨论(0)
  • 2021-01-01 12:01

    You can change value of observable like this:

    feature.totalLength(10)
    
    0 讨论(0)
提交回复
热议问题