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 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...
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 };...
I have 4 fields, each have their own custom validation but non are required. How would I put a validation so that at least one of the field must be filled.   self = this;  self.acc = ko.observable().extend({ acc: true }); self.Id = ko.observable().ex...
In this code example I'm looking for a way to pass parameters from data in Knockout's template into Knockout's data-bind that should ultimately appear in modal window.  The result should be a modal window that displays a participant's...
Problem: When My filter method is executing that is used to display an Html element, my observable array has not been populated yet by my web-api call resulting in nothing to filter from.   My Solution :  If I place an alert right before my filter me...
I have several observable properties. I don't want to reset individual observable properties. Here is some example code I have.  function viewData() {      var self = this;      self.Id = ko.observable("");      self.Name = ko.observable(...
In my ViewModel I have the following method that returns me the css class depending on pState:  function MyViewModel() {     var self = this;      self.GetClass = function(pState)      {         var lCssClass;          switch(pState)         {...
I am trying to bind checked on a checkbox input which resides inside an anchor tag which, itself, is click bound.  Whilst I am aware that this may not be entirely valid (interactive content may not be descendant of anchor-tags), I would still like to...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.