As I have just learnt the Script# that I don't know how to use knockoutjs with ScriptSharp. I tried to read through the KnockoutAPI but I am still confused how to write even just a view Model containing just few knockout Observables and how to use the basic function like GetValue and SetValue.
Thanks for your attention.
You can do something like this:
public class MyViewModel {
public Observable<string> firstName = Knockout.Observable<string>("Bob");
}
public static class App {
static App() {
MyViewModel vm = new MyViewModel();
Knockout.ApplyBindings(vm);
}
}
Hope that gets you started.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With