1
0
Fork 0
fgdata/webgui/topics/Tools.js

38 lines
807 B
JavaScript
Raw Normal View History

2015-01-25 12:02:20 +00:00
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
};
});