spacialistApp.controller('contextCtrl', ['$scope', 'mainService', function($scope, mainService) {
    var vm = this;
    vm.currentElement = mainService.currentElement;
    vm.editContext = angular.copy(vm.context);
    mainService.setCurrentElement({
        element: vm.editContext
    });

    vm.store = function(data) {
        vm.onStore({context: vm.editContext, data: data});
    };

    vm.addSource = function(entry) {
        vm.onSourceAdd({entry: entry});
    };
}]);

@@ -276,16 +276,39 @@
 tContext
+,%0A        data: vm.data
 %0A    %7D);

fix storing of element data