3 angular.module('zephyrApp')
4 .controller('SaveNoteModalController', function($scope, $modalInstance, Restangular) {
5 var baseNoteSaving = Restangular.all('/api/noteCreation')
7 $scope.save = function() {
11 note.content = new Array()
12 angular.forEach($scope.commandDirectives, function(command) {
13 if(command.isCompleted) {
15 command : command.params.command,
16 inputDir : command.params.inputDir,
17 outputDir: command.params.outputDir,
18 optionDatas : command.params.options
20 note.content.push(obj)
23 baseNoteSaving.post(JSON.stringify(note)).then(function(status) {
25 $modalInstance.close()
29 $scope.close = function() {
30 $modalInstance.close()