Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var bookmark = {
- id: 'id',
- description: 'description',
- notes: 'notes'
- }
- this.bookmark = ko.observable();
- this.bookmark.subscribe = function(bookmarkWithNewNotes) {
- //use the bookmarkWithNewNotes.id to update the bookmark in the db
- }
- this.bookmark(ko.mapping.fromJS(existingBookmark));
- <div databind="with: $root.bookmark" >
- Notes
- <textarea class="userNotes" rows="10" data-bind="value: notes" ></textarea>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement