mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-22 16:20:44 +01:00
0f180756ab
- Restructuring & co
14 lines
356 B
JavaScript
14 lines
356 B
JavaScript
define(function () {
|
|
app.registerController('AddUserCtrl', ['$scope', '$state', '$http', function($scope, $state, $http) {
|
|
$scope.user = {};
|
|
|
|
$scope.add = function () {
|
|
$http.post('/users', $scope.user)
|
|
.success(function (data) {
|
|
$state.transitionTo('users.list');
|
|
}).error(function () {
|
|
alert('cannot add user.')
|
|
});
|
|
}
|
|
}]);
|
|
}); |