mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-25 11:07:29 +00:00
Initial KnockoutSpa template
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import * as ko from 'knockout';
|
||||
|
||||
class CounterExampleViewModel {
|
||||
public currentCount = ko.observable(0);
|
||||
|
||||
public incrementCounter() {
|
||||
let prevCount = this.currentCount();
|
||||
this.currentCount(prevCount + 1);
|
||||
}
|
||||
}
|
||||
|
||||
export default { viewModel: CounterExampleViewModel, template: require('./counter-example.html') };
|
||||
Reference in New Issue
Block a user