Reimplements the recents feature

This commit is contained in:
2016-02-11 18:51:05 +01:00
parent ca9dd50429
commit df62e82922
8 changed files with 90 additions and 44 deletions

22
webapp/js/directives.js Normal file
View File

@@ -0,0 +1,22 @@
var directives = angular.module('satbd.satellite.bar.directives',[])
directives.directive('album', function() {
return {
scope: {
id: '=albumId'
},
templateUrl: 'js/directives/album.html',
restrict: 'A',
controller: 'AlbumCtrl'
};
});
directives.controller('AlbumCtrl', function($scope,$http,$log,albumService) {
albumService.get($scope.id)
.then(function(data) {
$scope.album = data;
$log.info('Got : ' + data.ID);
}, function(err) {
$log.error('Got error :' + err);
});
});