Knockback.js provides Knockout.js magic for Backbone.js Models and Collections.
Questions tagged [knockback.js]
23 questions
32
votes
2 answers
Is Knockback.js production ready?
I've used Backbone.js, I've learned about Knockout.js; however, now I found out about Knockback.js. It is supposed to get the best out of the other two tried& proven frameworks.
Do you have any experience with Knockback in production? I'm wary to…

Mihai Oprea
- 2,051
- 3
- 21
- 39
7
votes
2 answers
Implementing a Many-to-Many relationship with Backbone-Relational
I have a simple application which defines two classes, a Person and a PersonGroup, wherein there is a many-to-many relationship in place. A Person can have no group, or be assigned to all groups, and anything in between.
The example on…

Trevor Elliott
- 11,292
- 11
- 63
- 102
7
votes
2 answers
The simplest example of Knockback js working with a RESTful webservice such as ServiceStack?
I am looking for a VERY simple example that shows wiring up Knockback code to a backbone model that connects via RESTful service. I am using ServiceStack|c# backend. All of the links below are too complicated and use localStore rather than a…

Scott Idler
- 167
- 1
- 11
6
votes
2 answers
Can Typescript import Webpack UMD?
Using TypeScript, is there some way to import a module that has been wrapped by webpack UMD (Universal Module Definition)? For example:
npm install knockback
The .js file (node_modules/knockback/knockback.js) begins like this:
(function…

cbranch
- 4,709
- 2
- 27
- 25
4
votes
1 answer
Knockback.js: How can I make the view update when backbone save updates the model?
This is my first time working with Knockback.js.
I'm working on a Knockback proof of concept, but I'm having a hard time getting the view model to update when I save a model. In this case, what happens is the server returns a new Domain object with…

user1792263
- 41
- 4
2
votes
1 answer
Knockback Collection Observable throws "Cannot read property 'bind' of undefined" error
I'm trying to make a simple viewmodel to display a list of objects with Knockback. The View Model is rather simple, looking like this:
var objectives_collection = new ObjectiveCollection();
objectives_collection.fetch();
var view_model =…

moberemk
- 1,597
- 1
- 18
- 39
2
votes
1 answer
Knockback.js backbone collection only adds first element to UI
I'm trying to set something new up with Knockback.js, and right now I'm running into an issue with the knockout/knockback integration. The problem is, I've successfully written an event handler which adds a new model to the Objectives collection,…

moberemk
- 1,597
- 1
- 18
- 39
2
votes
1 answer
How can I get KnockBack CollectionObvservables as KnockOut observableArrays?
I am using KnockBack (w/ KnockOut & BackBone) and am having trouble getting KB CollectionObservable (CO) values in the same format as KO's ObservableArrays. This is the core essence of KB, of course -- allowing me to use BB models with KO's…

sellarafaeli
- 1,167
- 2
- 9
- 24
1
vote
1 answer
Filtering a collection of view models in using Knockback.js
I am currently creating a page using Knockback.js that displays an employee's tasks in a table. I have a view model for a task, which contains a boolean observable called isSelected. The view model for an employee contains a collection observable of…

Joep
- 305
- 1
- 6
1
vote
0 answers
Populating the hidden field in Javascript
I am using Knockback.js. I am a newbie to this whole javascript and html. I am trying to poplulate the hidden field in the function addFolder, But it always showing null.
This is the following javascript code(viewmodel).
GroupsView =…

Acjb
- 505
- 1
- 6
- 21
1
vote
2 answers
How to get the underlying Backbone Collection in a Knockback CollectionObservable from the $data context object with nested templates
Taking the following code snippet as a quick example:
var Animal = Backbone.Model.extend();
var Zoo = Backbone.Collection.extend({ model: Animal });
var tiger = new Animal({ name: "tiger" });
var zoo = new Zoo(tiger);
var viewModel = {
tiger:…

Clint
- 1,159
- 1
- 10
- 19
1
vote
1 answer
Knockback: Remove item from an observable collection
Given an observable collection in Knockback, how do I remove an item from the underlying collection in response to a knockout.js click event?

Petrus Theron
- 27,855
- 36
- 153
- 287
1
vote
0 answers
Backbone.LocalStorage saves but does not fetch collection using Knockback
Backbone.LocalStorage stores a list of players client-side when calling create on a players collection, but the stored models are not being fetched later, even though I can inspect them in localStorage. I can call…

Petrus Theron
- 27,855
- 36
- 153
- 287
1
vote
1 answer
How do I resolve this race condition with knockout and capybara?
I have a page that's rendering a wijmo combobox via the wijcombobox knockout binding ( http://wijmo.com/wiki/index.php/Using_Wijmo_with_Knockout ). I'm having difficulty testing this using capybara because of a race condition between the tests…

Ben Taitelbaum
- 7,343
- 3
- 25
- 45
0
votes
1 answer
Using a KnockBack ViewModel, is there a way to create a computed observable from the underlying Backbone model's methods?
Using a KnockBack ViewModel, is there a way to create a computed observable from the underlying Backbone model's methods?
As an example, in javascript:
var MyModel = Backbone.model.extend({
validate: function () {
return…

asgallant
- 26,060
- 6
- 72
- 87