mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-22 16:20:44 +01:00
21 lines
469 B
JavaScript
21 lines
469 B
JavaScript
define([
|
|
'app',
|
|
'factories/credential',
|
|
'services/credentials'
|
|
], function(app) {
|
|
app.registerController('AddCredentialCtrl', ['$scope', '$state', 'Credential', function($scope, $state, Credential) {
|
|
$scope.credential = new Credential();
|
|
|
|
$scope.add = function () {
|
|
$scope.credential.add()
|
|
.success(function (data) {
|
|
$state.transitionTo('credential.view', {
|
|
credential_id: data._id
|
|
});
|
|
})
|
|
.error(function (data) {
|
|
|
|
})
|
|
}
|
|
}]);
|
|
}); |