Questions tagged [knockout-2.0]

Knockout.js is an open source JavaScript library for dynamic HTML UIs using the Model-View-View Model (MVVM) pattern. This tag is for questions specific to the 2.0 releases.

Knockout.js is an open source JavaScript implementation of the Model-View-ViewModel (MVVM) UI pattern. This tag is for version 2.0 specific questions. See also the main tag for general information about Knockout.js.

Version 2.0 of Knockout.js as announced by its creator included the following new features:

  1. Control flow bindings such as if, ifnot, with, and foreach;
  2. Containerless control flow, e.g. <!-- ko foreach: products -->;
  3. Access to parent binding contexts through contextual variables such as $parent;
  4. Cleaner event handling using the click binding;
  5. Binding providers (and hence external bindings)
  6. Throttling by extending observables.

Find the v2.0.0 source on GitHub.

1009 questions
-1
votes
1 answer

Using Template Binding of Knockout

I have created a jsFiddle under which I am learning template binding of Knockout. For simple example, I was successful in applying template binding. However, when I created this jsfiddle example(as below) that includes css as well. It is not working…
Running Rabbit
  • 2,634
  • 15
  • 48
  • 69
-1
votes
1 answer

Radio button two way binding in Knockout js with custom Binding getting an error as observable is not a function

JSON DATA [ { "ErrorCode": 0, "ErrorMessage": null, "Heading": "Assessment", "SectionsSet": [ { "ErrorCode": 0, "ErrorMessage": null, "Heading":…
user3311567
  • 61
  • 1
  • 2
  • 8
-1
votes
2 answers

How to clear knockout observable array?

I'm trying to reset a knockout observable array in my view model to contain nothing, yet I'm being stonewalled at every turn. When it is defined, I set it empty: self.currentPeople = ko.observableArray([]); Yet if I try to alter it down the…
marked-down
  • 9,958
  • 22
  • 87
  • 150
-1
votes
1 answer

Is this actually a js promise?

I have this code in a javascript module (I'm using Require js and Knockout) var getPersons = function(personsObservable) { personsObservable([]); var getOptions = { url: 'api/persons', type: 'GET', dataType: 'json' …
mitomed
  • 2,006
  • 2
  • 29
  • 58
-1
votes
2 answers

How to add datas from JSON data

In this fiddle inside view appointmnets tab there is a available hospital drop down which has 3 fields A,B,c. Now I want to make this dropdown from the values that I get from JSON. This is my JSON data { "doctors": [ { …
SpringLearner
  • 13,738
  • 20
  • 78
  • 116
-1
votes
1 answer

How to add a row on button click?

in this fiddle there is an add timing button. There is default row having week day dropdown,from time textfield,to time textfield and hospital drop down.Now when I click on the add timing button I want another row having week day dropdown,from time…
SpringLearner
  • 13,738
  • 20
  • 78
  • 116
-1
votes
1 answer

Re-sizing of html table having knockout binding

Please find the working sample code as below. This code contains 1 sample html table having 1 record.But this logic if i try to implement in my project having knockout binding , its not working.Kindly suggest me some options to re-size table columns…
user2800089
  • 2,015
  • 6
  • 26
  • 47
-1
votes
1 answer

script# for beginners on vs2012

Any knockout.js example on vs2012? And how to setup the script# project to copy the script on asp.net mvc4 project.. adding as reference does not solve in my case and the sample on git does not compile by showing 'command not found. Error 0009'
Ted Mosby
  • 67
  • 1
  • 5
-1
votes
5 answers

Knockout Binding

I'm binding some list items to a dropdown through Knockout but it's not binding. I don't know where I am going wrong.. I used the knockout mapping plugin and even tried a simple method but nothing seems to work. My basic structure is like…
-1
votes
2 answers

Fake Errors messages are triggered when I call "viewModel.errors().length"

I have a ViewModel and i use that with ericmbarnard / Knockout-Validation. In it i have this field: self.checksum = ko.observable().extend({required: {message: " * Required"}}); In my html, this:
Eduardo
  • 1,698
  • 4
  • 29
  • 48
-2
votes
1 answer

Format Numbers in koGrid

How can I format numbers as currency (with commas) in a Knockout koGrid?
Chris
  • 795
  • 2
  • 12
  • 27
-2
votes
1 answer

UI not updating with ko.utils.arrayFilter

When I update my ko.computed, the UI does not update. I have a click event that fires a method called selectThing. selectThing updates computed, which in turn should update my UI (it doesn't). I am new to knockout, so it is probably a concept I…
Chris
  • 795
  • 2
  • 12
  • 27
-2
votes
2 answers

Knockoutjs and binding

I'm going crazy with knockuoutjs and binding: I have defined a CreateEditGroup.js document and I have created methods and Collection to retrieve or update a Group in my application: var url = window.location.pathname; var GroupID =…
-2
votes
1 answer

knockoutjs how populate select

i'm a beginner in knockout an i've some doubts. my project is an mvc4 webapi, i can update a simple web gui actually, but in complex gui with select ecc i don't know how to do. When a gui present a select that must be populate with data for choice…
TheNeXt
  • 17
  • 4
-2
votes
1 answer

Sum of table columns using knockout.js

How can i achieve the above table column calculation using knockout.js. I can implement the same using jquery, but as I'm beginner to knockout.js i don't know the implementation using knockout.js. I don't want to generate the above mentioned table…
Asif
  • 1,775
  • 4
  • 25
  • 39
1 2 3
67
68