mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-03 14:24:23 +01:00
23 lines
624 B
Plaintext
23 lines
624 B
Plaintext
|
Application.Directives.directive('members', [ 'Member',
|
||
|
function (Member) {
|
||
|
return ({
|
||
|
restrict: 'E',
|
||
|
templateUrl: '<%= asset_path "home/members.html" %>',
|
||
|
link ($scope, element, attributes) {
|
||
|
// The last registered members who confirmed their addresses
|
||
|
$scope.lastMembers = null;
|
||
|
|
||
|
// constructor
|
||
|
const initialize = function () {
|
||
|
Member.lastSubscribed({ limit: 4 }, function (data) {
|
||
|
$scope.lastMembers = data;
|
||
|
})
|
||
|
};
|
||
|
|
||
|
// !!! MUST BE CALLED AT THE END of the directive
|
||
|
return initialize();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
]);
|