UNPKG

zettapi_client

Version:

Client side CRUD operations in angular to use with zettapi_server rest api to get started quickly in any CMS project

13 lines (12 loc) 415 B
app.directive('entityEdit', function(zapiPath) { return { restrict: 'E', scope: true, replace: false, link: function(scope, element, attrs) { var scaffoldUrl = scope.entity.custom ? 'client/entity/' : (zapiPath + '/entity/'); scope.contentUrl = scaffoldUrl + scope.entityName + '/' + scope.entityName + '.edit.html'; }, template: '<div ng-include="contentUrl"></div>' }; });