Reorganizes the project with clean MVC structure

This commit is contained in:
2016-02-11 17:04:15 +01:00
parent 143274f369
commit e109e116f5
18 changed files with 187 additions and 219 deletions

20
webapp/directives.js Normal file
View File

@@ -0,0 +1,20 @@
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;
});
};
});