UNPKG

zettapi_client

Version:

Admin panel and client-side CRUD operations in angular to use with zettapi_server rest api to get started quickly in any CMS project.

19 lines 489 B
app.directive('entitySave', function () { return { restrict: 'E', scope: { entity: "@", item: "=", form: "=", afterSave: '&' }, templateUrl: 'directives/entity/entity.save.html', controller: function ($scope, $entity) { $scope.save = function (entity, item) { $entity.add(entity, item, $scope).then(function(response) { if (typeof $scope.afterSave === 'function') $scope.afterSave(); }); }; } }; });