Creating a ViewModel from the server

If you’ve been doing much work with KnockoutJS you’ll probably see examples where the code looks like this:
var todoViewModel = function() { this.items = new ko.observableArray([‘Item 1’, ‘Item 2’, ‘Item 3’]); this.selectedItem = new ko.obs…


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail

If you’ve been doing much work with KnockoutJS you’ll probably see examples where the code looks like this: var todoViewModel = function() { this.items = new ko.observableArray(['Item 1', 'Item 2', 'Item 3']); this.selectedItem = new ko.observable('Item 1'); }; What I’m trying to point out here is that the viewModel is being defined in JavaScript and that the items within it are coded into your JavaScript. While you can argue that this is demo code and it should only be treated as such something I’ve noticed is there isn’t any other examples.


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail


Print Share Comment Cite Upload Translate Updates
APA

Posts on LINQ to Fail | Sciencx (2011-09-18T00:00:00+00:00) Creating a ViewModel from the server. Retrieved from https://www.scien.cx/2011/09/18/creating-a-viewmodel-from-the-server/

MLA
" » Creating a ViewModel from the server." Posts on LINQ to Fail | Sciencx - Sunday September 18, 2011, https://www.scien.cx/2011/09/18/creating-a-viewmodel-from-the-server/
HARVARD
Posts on LINQ to Fail | Sciencx Sunday September 18, 2011 » Creating a ViewModel from the server., viewed ,<https://www.scien.cx/2011/09/18/creating-a-viewmodel-from-the-server/>
VANCOUVER
Posts on LINQ to Fail | Sciencx - » Creating a ViewModel from the server. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2011/09/18/creating-a-viewmodel-from-the-server/
CHICAGO
" » Creating a ViewModel from the server." Posts on LINQ to Fail | Sciencx - Accessed . https://www.scien.cx/2011/09/18/creating-a-viewmodel-from-the-server/
IEEE
" » Creating a ViewModel from the server." Posts on LINQ to Fail | Sciencx [Online]. Available: https://www.scien.cx/2011/09/18/creating-a-viewmodel-from-the-server/. [Accessed: ]
rf:citation
» Creating a ViewModel from the server | Posts on LINQ to Fail | Sciencx | https://www.scien.cx/2011/09/18/creating-a-viewmodel-from-the-server/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.