Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. function RowReservation(initialRow) {
  2. var self = this;
  3.  
  4. self.row = ko.observable(initialRow);
  5. self.rowID = ko.observable(self.row().rowID);
  6. self.price = ko.observable(self.row().price);
  7. }
  8.  
  9. <input data-bind="value: price" />
  10.  
  11. <input data-bind="value: $data.row().price"/>
  12.  
  13. // RowReservationObject
  14.  
  15. {'row':
  16. {'rowName': 'Standard',
  17. 'rowID': 1,
  18. 'price': 19.99 }, // --> this is what I'm binding against now
  19. 'rowID': 1
  20. 'price': 19.99} // -- this is what you were binding against before
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement