mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-10 21:24:20 +01:00
89e146d419
- twitter - members
23 lines
614 B
Plaintext
23 lines
614 B
Plaintext
Application.Directives.directive('projects', [ 'Project',
|
|
function (Project) {
|
|
return ({
|
|
restrict: 'E',
|
|
templateUrl: '<%= asset_path "home/projects.html" %>',
|
|
link ($scope, element, attributes) {
|
|
// The last projects published/documented on the plateform
|
|
$scope.lastProjects = null;
|
|
|
|
// constructor
|
|
const initialize = function () {
|
|
Project.lastPublished(function (data) {
|
|
$scope.lastProjects = data;
|
|
})
|
|
};
|
|
|
|
// !!! MUST BE CALLED AT THE END of the directive
|
|
return initialize();
|
|
}
|
|
});
|
|
}
|
|
]);
|