1
0
Fork 0
fgdata/webgui/topics/Tools.js
2015-02-04 21:05:55 +01:00

37 lines
807 B
JavaScript

define([
'knockout', 'text!./Tools.html'
], function(ko, htmlString) {
function ViewModel(params) {
var self = this;
self.topics = [
'Holding Pattern',
'Wind Calculator',
'Vertical Navigation',
'Stopwatch'
];
self.selectedTopic = ko.observable();
self.selectedComponent = ko.pureComputed(function() {
return "Tools/" + self.selectedTopic();
});
self.selectTopic = function(topic) {
self.selectedTopic(topic);
}
self.selectTopic(self.topics[0]);
}
ViewModel.prototype.dispose = function() {
}
// Return component definition
return {
viewModel : ViewModel,
template : htmlString
};
});