2015-02-18 11:31:00 +00:00
|
|
|
define([
|
|
|
|
'jquery', 'knockout', 'text!./Stopwatch.html', 'kojqui/button'
|
|
|
|
], function(jquery, ko, htmlString) {
|
|
|
|
|
|
|
|
function ViewModel(params) {
|
|
|
|
var self = this;
|
|
|
|
|
2015-02-22 20:18:23 +00:00
|
|
|
self.watches = ko.observableArray([]);
|
2015-02-18 11:31:00 +00:00
|
|
|
|
|
|
|
self.addWatch = function() {
|
|
|
|
self.watches.push(self.watches().length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ViewModel.prototype.dispose = function() {
|
|
|
|
}
|
|
|
|
|
|
|
|
// Return component definition
|
|
|
|
return {
|
|
|
|
viewModel : ViewModel,
|
|
|
|
template : htmlString
|
|
|
|
};
|
|
|
|
});
|