community-app/app/scripts/controllers/accounting/AccountingRuleController.js
Anwesh Nayak 89974697aa
fix #2777 : scroll to top feature implemented (#2873)
* scroll to top feature

* small fix

* unwanted commits removed

* unwanted commits removed2

* unwanted commits removed3
2021-03-06 00:54:31 +05:30

23 lines
846 B
JavaScript

(function (module) {
mifosX.controllers = _.extend(module, {
AccountingRuleController: function (scope, resourceFactory, location, anchorScroll) {
scope.routeTo = function (id) {
location.path('/viewaccrule/' + id);
};
scope.scrollto = function (link){
location.hash(link);
anchorScroll();
};
resourceFactory.accountingRulesResource.get(function (data) {
scope.rules = data;
});
}
});
mifosX.ng.application.controller('AccountingRuleController', ['$scope', 'ResourceFactory', '$location','$anchorScroll', mifosX.controllers.AccountingRuleController]).run(function ($log) {
$log.info("AccountingRuleController initialized");
});
}(mifosX.controllers || {}));