mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-23 00:31:03 +01:00
0f180756ab
- Restructuring & co
20 lines
438 B
JavaScript
20 lines
438 B
JavaScript
define([
|
|
'factories/identity',
|
|
'services/identities'
|
|
], function () {
|
|
app.registerController('AddIdentityCtrl', ['$scope', '$state', 'Identity', function($scope, $state, Identity) {
|
|
$scope.identity = new Identity();
|
|
|
|
$scope.add = function () {
|
|
$scope.identity.add()
|
|
.success(function (data) {
|
|
$state.transitionTo('identity.view', {
|
|
identity_id: data._id
|
|
});
|
|
})
|
|
.error(function (data) {
|
|
|
|
})
|
|
}
|
|
}]);
|
|
}); |