knockout-mapping-plugin Questions

3

When 'create' option is used in knockout mapping we would make the array an observable array. But how do we make the properties of each object in the observable array an observable ? In this examp...
Boardman asked 29/8, 2014 at 16:0

4

Solved

Is there any way in Knockoutjs binding where I can specify optionsGroup ? something like follwoing <select data-bind="options: collection, optionsText: 'Text', optionsGroup: 'Group'/> Ple...
Unitarian asked 23/1, 2012 at 13:27

2

Solved

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 c...

2

Solved

I get the following data from the server: var data = [{ id: 0, child: { prop1 : 'a', prop2 : 'b' } } //Child object has data ,{ id: 0, child: null } ]; // Child object is null I'm having some i...
Maddeu asked 6/9, 2013 at 9:40

5

Solved

I'm thinking that my application is getting quite large now, too large to handle each View with a single ViewModel. So I'm wondering how difficult it would be to create multiple ViewModels and loa...
Pioneer asked 15/2, 2012 at 12:52

2

So I have a simple Signalr/Knockout project that uses the mapping plugin to bind a simple object (item with an array of more items) to viewModels I defined in JS: var someObjectMapping = { 'MyIt...
Taffeta asked 23/7, 2015 at 5:11

3

Solved

I fetch a json object from the server and populate my view. I then change the data, push it back to the server. I then fetch a new copy of the data hoping it will refresh my view with any changes. ...
Billybillycock asked 16/2, 2012 at 2:26

3

Solved

I have the following model: var model = { A: 'One', B: 'Two', C: 'Three' }; I bind various UI elements to these fields, which works great. However, I convert the model back to a JavaScript ob...
Chintz asked 20/2, 2013 at 19:23

6

Solved

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: { ...

3

I have this JSON data coming from the server: {"HaveNotification":false,"IsError":false,"Title":null,"Description":null} and am trying to populate this view model via ko.mapping: var notifyVM =...
Fleabitten asked 1/8, 2013 at 0:44

3

Solved

I have an array of items coming back from the service. I'm trying to define a computed observable for every Item instance, so my instinct tells me to put it on the prototype. One case for the comp...
Crawly asked 24/4, 2012 at 14:22

1

Solved

I have daily data for multiple employees and depending on the start time and end time that could mean a lot of data. So with the mapping plugin i mapped them into one big list, but i will need th...

1

Solved

Can't figure out why disposing computed observables doesn't remove the subscriptions from global variables in case view model was created using knockout.mapping plugin. First let's see what happens...
Cateyed asked 15/12, 2014 at 18:16

2

Solved

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 t...
Barbiturate asked 8/9, 2012 at 19:46

2

Solved

It seems that knockout is not mapping the properties of objects in an array correctly. See this example from the chrome console: > var viewmodel = ko.mapping.fromJS({list:[]}); undefined >...
Delinquent asked 16/4, 2012 at 13:29

2

Solved

Right now, I'm using this JSON with the KO Mapping plugin and it's working fine: { "Controls": [ { "Fields": [ { "Name": "emailField", "Text": "email", "Visible": true }, { "Name": "h...
Crary asked 18/4, 2012 at 15:48

2

Solved

How Do I iterate an knockout observable array bound to data with knockout js mapping plugin ?. I have created this fiddle to demonstrate my issue. When I try to get the value of the knockout js arr...
Insult asked 21/5, 2013 at 2:30

8

Solved

In my view model I have a IsMale value that has the value true or false. In my UI I wish to bind it to the following radio buttons: <label>Male <input type="radio" name="IsMale" value="...

4

I have a model with data annotations and i am an dynamically binding that with viewmodel using knockout template binding and mapping plugin. I am trying to do a unobtrusive client validation to be ...

3

Solved

I'm getting data from a WCF service,and i map, and bind the data with my DOM object : var PayinyVM = {}; $.getJSON('/service/PaidService.svc/PaidList', function (data) { var tmp = JSON.stringif...
Overvalue asked 5/6, 2012 at 23:11

2

Solved

I'm trying to attach validation to a mapped view. I'm using Knockout Mapping and Validation plugins. Pseudo-models: Person { int Id; string Name; Book[] Books; } Book { int Id; string Name; ...

2

Solved

I have just started trying knockout.js. The ko.mapping offers a nifty way to get and map data from server. However I am unable to get the mapping to work. I have a simple model: //var helloWorldM...
Trim asked 21/2, 2014 at 3:6

3

Solved

I'm binding data to a page using KnockoutJS, the ViewModel is being populated by an JSON response from an AJAX call using the mapping plugin, like this: $(function () { $.getJSON("@Url.Action("Ge...
Faze asked 22/2, 2012 at 21:29

1

So I am trying to integrate knockout.mapping.js with require.js. I have tried following this example. Unfortunately, I keep on getting this error: GET http://[url]/Scripts/app/contractor/ko.js ...
Bouilli asked 20/9, 2013 at 20:55

4

Solved

i am using http://aehlke.github.com/tag-it/ in my code how to bind with viewmodel html <ul data-bind='jqueryui: "tagit",foreach: Tags' > <li class="tagit-choice ui-widget-content ui-st...
Jesus asked 12/10, 2012 at 8:33

© 2022 - 2024 — McMap. All rights reserved.