I am using Knockout.js as a MVVM library to bind my data to some pages. I'm currently building a library to make REST calls to a web service. My RESTful web service returns a simple structure:  {     id : 1,     details: {         name: "John...
Say I have this array of same-type objects:  var people = [     { status: 0, name: "name1"},     { status: 1, name: "name2"} ];   and I want it not only to be observableArray, but also I want to observe ONLY, say, status property of e...
I have an observable array  var myArray = ko.observableArray([       { name: "Jimmy", type: "Friend", Age: 30 },       { name: "George", type: "Friend", Age: 40 },       { name: "Zippy", type: "Enemy",...
I am having issues with defining a function inside my viewmodel.  I fetch json data via jquery getJSON and map this data to my viewmodel.  $.getJSON('/Company/GetCompanies', function(data) {      var viewModel = new CompanyViewModel()     vie...
I am new to knockout and I am having a problem with using the mapping plugin as I do not understand how it maps my JSON data.  This is a sample json data similar to what is in my program:  contact: {         name : 'John',         email : ...
Does anyone have idea, if it's possible to detect whenever a change occur inside observableArray while using ko mapping, this mean without having to create the model by hand?  self.items = ko.observableArray([]) var data = ko.mapping.fromJS(resul...
See JsFiddle here http://jsfiddle.net/WtgbV/2/  In words: I have some ajax call, and in the server's response I get some array of items (Items in knockout viewmodel)  I need to know that property name was changed in element with id==2 etc to save...
Here's my scenario.  I'm using the knockout mapping plugin to create an observable viewmodel hierarchy for me.  My hierarchy has nested elements in it.  At a particular point in the hierarchy I want to put an Add button to insert a new blank...
im following this example http://jsfiddle.net/rniemeyer/badZb/ . I just copy and paste the exact code into a sample application and it gave me this error : "ko.mapping is undefined" . Anyone know whats happening? My ko.observable and dependen...
I am using kendo mobile app builder  and I am using knockout js for bindings but I am getting error "You cannot apply bindings multiple times to the same element". I have two javascript file which consist bindings, below my code  //Employee.j...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.