2015-01-25 12:02:20 +00:00
|
|
|
define([
|
2015-03-04 11:16:17 +00:00
|
|
|
'knockout', 'text!./Environment.html', './SubtopicViewmodel'
|
|
|
|
], function(ko, htmlString, SubtopicViewmodel) {
|
2015-01-25 12:02:20 +00:00
|
|
|
ko.components.register('Environment/Date & Time', {
|
|
|
|
require : 'topics/Environment/DateTime'
|
|
|
|
});
|
|
|
|
|
|
|
|
ko.components.register('Environment/Weather', {
|
|
|
|
require : 'topics/Environment/Weather'
|
|
|
|
});
|
|
|
|
|
|
|
|
ko.components.register('Environment/Position', {
|
|
|
|
require : 'topics/Environment/Position'
|
|
|
|
});
|
|
|
|
|
|
|
|
// Return component definition
|
|
|
|
return {
|
2015-03-04 11:16:17 +00:00
|
|
|
viewModel : {
|
|
|
|
createViewModel : function(params, componentInfo) {
|
|
|
|
return new SubtopicViewmodel([
|
|
|
|
'Date & Time', 'Weather', 'Position',
|
|
|
|
], "Environment", params);
|
|
|
|
},
|
|
|
|
},
|
2015-01-25 12:02:20 +00:00
|
|
|
template : htmlString
|
|
|
|
};
|
|
|
|
});
|