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-19 09:12:09 +00:00
|
|
|
self.watches = ko.observableArray([0]);
|
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
|
|
|
|
};
|
|
|
|
});
|