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.

22 lines (20 loc) 627 B
app.directive('zlChangePassword', function() { return { restrict: 'E', scope: { zlClass: '@?' }, replace: false, templateUrl: 'directives/auth/changePassword/changePassword.html', controller: function($scope, $auth, $rootScope, zapi) { if (typeof $scope.zlClass === 'undefined') $scope.zlClass = "form-control"; $scope.useInputLarge = zapi.useInputLarge; $scope.changePassword = function(item) { $auth.changePassword($rootScope.login, item.password, item.repeat, function(err) { if (err) return; $auth.logout(); }); }; } }; });