function save()

in entity-browser-frontend/app/controller/form-view/form-view.js [56:75]


        function save() {
            var propsForm = $scope.getForm('propsForm');
            $scope.makeDirty(propsForm);
            if (propsForm.$invalid) {
                return;
            }
            var changeSummary = entities.getChanges($scope.state.initial.properties, $scope.state.current.properties, formViewCtrl.linkChanges);

            entities.save($scope.state.initial, changeSummary).then(function (response) {
                var savedEntity = response.data;
                alert.success(savedEntity.label + ' updated');
                $scope.toggleView();
                if ($scope.state.initial.id) {
                    $scope.state.update(savedEntity);
                    return response;
                } else {
                    formViewCtrl.navigation.toEntity(savedEntity.typeId, savedEntity.id, false);
                }
            }, alert.showHttpError);
        }