UserController.js 552 Bytes
Newer Older
lepdou committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
user_module.controller('UserController',
                      ['$scope', '$window', 'toastr', 'AppUtil', 'UserService',
                       UserController]);

function UserController($scope, $window, toastr, AppUtil, UserService) {

    $scope.user = {};
    
    $scope.createOrUpdateUser = function () {
        UserService.createOrUpdateUser($scope.user).then(function (result) {
            toastr.success("创建用户成功");
        }, function (result) {
            AppUtil.showErrorMsg(result, "创建用户失败");
        })

    }
}