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) 435 B
app.directive('entityList', 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 + '.list.html'; }, template: '<div ng-include src="contentUrl" include-replace></div>' }; });