mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 15:56:48 +00:00
22 lines
722 B
JavaScript
22 lines
722 B
JavaScript
|
|
(function(module) {
|
|
mifosX.controllers = _.extend(module, {
|
|
AddCodeController: function(scope, resourceFactory, location) {
|
|
scope.codes = [];
|
|
resourceFactory.codeResources.getAllCodes(function(data) {
|
|
scope.codes = data;
|
|
});
|
|
|
|
scope.submit = function() {
|
|
resourceFactory.codeResources.save(this.formData,function(data){
|
|
location.path('/codes');
|
|
});
|
|
};
|
|
}
|
|
});
|
|
mifosX.ng.application.controller('AddCodeController', ['$scope', 'ResourceFactory', '$location', mifosX.controllers.AddCodeController]).run(function($log) {
|
|
$log.info("AddCodeController initialized");
|
|
});
|
|
}(mifosX.controllers || {}));
|
|
|