getPropertiesByStatusService.js (服务)
(function () {
appModule.service('getPropertiesByStatusService', ['abp.services.app.property', function (propertyService) {
this.propertyList = function (filter) {
propertyService.getPropertiesByStatus({ filter: filter })
.success(function (result) {
return result;
});
};
}
]);
})();
index.js (控制器)
(function () {
appModule.controller('tenant.views.propertymanagement.index', ['$scope', 'getPropertiesByStatusService', function ($scope, getPropertiesByStatusService) {
var vm = this;
var list = getPropertiesByStatusService.propertyList(null);
}]);
})();
你能告诉我如何获得list
的价值吗?由于async
性质,它没有显示任何价值。