Update: forgot the one question per question rule. Cut second question out of this one.  Trying to make a list of users sortable by different criteria with animation. Was already using Knockout so this demo seemed like a good direction to take. I swi...
I'm new to knockout.js (and this is also my first stackoverflow post) and I'm now facing the following problem.   I'm not able to bind the data from web api to a ko.observablearray. Why is the length of this Announcements ko.observablearr...
All of the sudden, the following code no longer works when targeting KnockoutJS 3.0.  How can I work around this?  JavaScript:  ko.bindingHandlers.limitCharacters = {     update: function(element, valueAccessor, allBindingsAccessor, viewModel)     {...
What is the best way to prevent user from seeing things like admin links in a knockout component?  I don't want to make a client request if the user has right to see those links because it would expose this section on the client.  The only way I...
I am using a knockout foreach (more specifically, template: { foreach: items }) binding to display a list of elements. I then proceed to take the following actions:   Swap the first and second elements of the observable array. I see the changes refle...
I've just began to explore knockout components, because our codebase was way before the components were introduced.  A few things I don't get at first read.   How can one use an existing viewmodel at component binding? To what should I bind w...
I have an array of objects for which I am showing their properties. How can add an individual edit functionality to them? Lets say it to be an edit button for each one of the elements of the list.  I want to show input fields instead of text fields w...
I am packaging a component as a single AMD module using requirejs following this example: https://github.com/sumitkm/BuildingSpaUsingKO/tree/Part2  The problem is when adding a click event when it calls that function in the viewmodel the self propert...
A co-worker ran into the problem that a computed he wanted to test was not returning the expected output. This happens because we want to stub other computeds (which again are dependent on other computeds). After stubbing there are 0 observables left...
Knockout is just great but I'm a little bit confused on how to deal with DOM elements after they are generated. For example I have a collection of users. Each user has an Id:  var user = {    id : 123,    name : 'testUser',    age: 45 };...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.