Showing posts with label View Model with observable. Show all posts
Showing posts with label View Model with observable. Show all posts

Thursday, October 3, 2013

simple example of how can you use observable to bind html text

Here is code for your html part
First name:

Last name:




this is for your ViewModel which you can use . The noticeable part here is i have used observable instead of using just plain JavaScript strings . so now when any changes made to those properties , changes will also refelect in your model . 
function AppViewModel() {
    this.firstName = ko.observable("Rahul");
    this.lastName = ko.observable("Sharma");
}
// Activates knockout.js
ko.applyBindings(new AppViewModel()); 
Here is output window screen and link of js fiddle 




ASP.NET Core

 Certainly! Here are 10 advanced .NET Core interview questions covering various topics: 1. **ASP.NET Core Middleware Pipeline**: Explain the...