0
anelengqandu created
Hi
Have problem with angular service, does not hit my my method on Application side
(function() {
angular.module('app').controller('app.views.employees.index', [
'$scope', '$modal', 'abp.services.app.employees',
function ($scope, $modal, employeeService) {
var vm = this;
vm.employees = [];
function getEmployees() {
employeeService.getEmployees({}).success(function (result) {
vm.employees = result.items;
});
}
vm.openEmployeeCreationModal = function() {
var modalInstance = $modal.open({
templateUrl: '/App/Main/views/employees/createModal.cshtml',
controller: 'app.views.employees.createModal as vm',
backdrop: 'static'
});
modalInstance.result.then(function () {
getEmployees();
});
};
getEmployees();
}
]);
})();
public ListResultOutput<EmployeeDto> GetEmployees() {
var employees = _employeeRepository.GetAll();
return new ListResultOutput<EmployeeDto> { Items=Mapper.Map<List<EmployeeDto>>(employees)};
}
What am I missing maybe?
2 Answer(s)
-
0
What's your application service class and interface names?
-
0
Hi, i managed to get the problem, another file that was hidden had the same controller name :roll: