All Questions
Tagged with knockout.js knockout-mapping-plugin
885
questions
1
vote
1
answer
106
views
Unwrap Typescript fields in Knockout
I have a domain class, with all the fields being primitives, string, number or boolean. For simplicity, let's work with a bike:
interface Bike {
wheels: number;
isMTB: boolean;
brand: string;
}
...
1
vote
1
answer
158
views
Knockout title not updating with observable
I have a knockout binding with a function that should update the title depending on whether the page is in edit mode or not. The function seems to be working as expected, returning an empty string in ...
1
vote
0
answers
57
views
Change event not binding correctly on second/multiple Child View Model with KnockoutMapping
I'm working on an MVC/Entity Framework app (my first application, I'm primarily a SQL DBA/BI Developer) and I'm using knockout.js with the mapping plugin. I've got a view model with two child view ...
1
vote
2
answers
58
views
Knockout.js get property of an object for location.href
i recently discover Knockout and i'm struggling for getting properties of an object in a foreach:
Here is my code :
<table class="table">
<thead>
<tr>
<th>...
0
votes
1
answer
139
views
Knockoutjs mappings don't add observables to array of strings
I'm getting this kind of data from the server
{
FirmName: "Firm Name",
Address: "123 Address",
AltNames: [
"First Alt Name",
"Second Alt ...
1
vote
0
answers
49
views
Knockout and ASP.NET MVC edit form display duplicate rows after mapping
Good morning everyone
I searched for the problem but I can't find it.
I'm trying to edit a quote in an asp.net mvc application with knockout, with a nested collection and computed variables
The ...
0
votes
0
answers
55
views
Capture differential / delta payload in Knockout view model
I am using a KO viewmodel which interfaces a REST end-point. The REST end-point serves me plain JSON data like:
var data = {
"firstName": "John",
"lastName": "Doe
};
Data is then transformed ...
1
vote
1
answer
250
views
KnockoutJS: ko.mapping.toJS, but do NOT ignore computed properties
In KnockoutJS, we can go
ko.mapping.toJS(object)
and get our object returned with observables and whatnot converted to vanilla Javascript object. Now, ko.mapping.toJS ignores computed properties. I ...
0
votes
3
answers
36
views
Knockout update only part of the viewmodel
lets assume a viewmode fromJS
var js = {
Foo1 : {
BarA : 'text',
BarB : 'other text' },
Foo2 : {
BarC : 'some text' }};
var ...
0
votes
1
answer
113
views
knockout nested observables using view controller
We are refactoring our client code and implementing viewmodels. I'd like to keep our viewmodels as dumb as possible, having them be solely data representations.
We'll use a view controller and pub/...
2
votes
1
answer
250
views
beforeChange value is undefined in Knockout when using the mapping plugin
Based on the answer of this question, I try to get the value before change in an observable with the following code.
var phoneBook;
function debug(s) {
$("#log").append('<br>' + s);
}...
0
votes
0
answers
38
views
Referencing mapped child observables with KnockoutJS
I would like to be able to map the incoming data down to the child objects and their observable arrays and access observables in child objects (in this example: Main -> BikeShop().BikeShopExtra()).
...
0
votes
1
answer
125
views
Knockout foreach within foreach
Take for instance -
<!--ko foreach: WorkItems-->
<tbody data-bind="foreach: ActionPlans">
// table data here
</tbody>
<!--/ko-->
I am trying to ...
0
votes
1
answer
108
views
convert the list of items into dropdown list knockout js
I'm new to knockout. May I know how should I convert this unordered list of items into dropdown list with same databinding.
<div class="col-lg-4 col-md-4 col-sm-4">
<h4>Select a Request ...
0
votes
1
answer
807
views
How to convert json string to ko.observableArray([]), they get an error data is not defined?
I am new to knockout js, I create a table of data display with knockout framework and ajax call. I have Problem with the observable array should not get the values and display in table.
My code is :
...