Improves album directives

This commit is contained in:
2016-02-12 11:37:36 +01:00
parent df62e82922
commit ce1ee99c9f
5 changed files with 24 additions and 18 deletions

View File

@@ -6,7 +6,7 @@ directives.directive('album', function() {
id: '=albumId'
},
templateUrl: 'js/directives/album.html',
restrict: 'A',
restrict: 'E',
controller: 'AlbumCtrl'
};
});
@@ -15,8 +15,7 @@ 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);
$log.error('Could not fetch album' + $scope.id + ' :' + err);
});
});