21 lines
419 B
JavaScript
21 lines
419 B
JavaScript
var directives = angular.module('satbd.satellite.bar.directives')
|
|
|
|
directives.directive('album', function() {
|
|
return {
|
|
scope: {
|
|
id: '@album-id'
|
|
}
|
|
templateUrl: 'js/directives/album.html',
|
|
restrict: 'E',
|
|
};
|
|
});
|
|
|
|
directives.controller('albumCtrl', function($scope,$html) {
|
|
$scope.init = function() {
|
|
$http.get('/api/albums/'+ $scope.id)
|
|
.success(function(data) {
|
|
$scope.album = data;
|
|
});
|
|
};
|
|
});
|