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.
18 lines (16 loc) • 431 B
JavaScript
app.directive('zlNewsletter', function() {
return {
restrict: 'E',
scope: true,
replace: false,
templateUrl: 'directives/newsletter/newsletter.html',
controller: function($scope, $newsletter, zapi) {
$scope.useInputLarge = zapi.useInputLarge;
$scope.saveEmail = function(item) {
$newsletter.subscribe(item, function() {
$scope.newsItem = {};
});
};
}
};
});