two way binding not working in knockout.js

后端 未结 2 1264
眼角桃花
眼角桃花 2021-01-26 16:36

I am trying to update the UI after chages to viewModel but it doesn\'t work , am I missing something ? http://jsfiddle.net/rdZjb/1/

  viewModel = {
        first         


        
2条回答
  •  深忆病人
    2021-01-26 16:46

    To change an observable (after initializing it) via Javascript, you need to call it as a function such as

    viewModel.firstName("Paul");
    

提交回复
热议问题