Reorganizes the project with clean MVC structure
This commit is contained in:
1
webapp/js/views/authors/authors.html
Normal file
1
webapp/js/views/authors/authors.html
Normal file
@@ -0,0 +1 @@
|
||||
<h1>Par autheurs </h1>
|
||||
9
webapp/js/views/authors/authors.js
Normal file
9
webapp/js/views/authors/authors.js
Normal file
@@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('satbd.satellite.bar.views.authors',[
|
||||
'ngRoute'
|
||||
]).config(function($routeProvider) {
|
||||
$routeProvider.when('/authors', {
|
||||
templateUrl: 'js/views/authors/authors.html',
|
||||
});
|
||||
})
|
||||
1
webapp/js/views/recents/recents.html
Normal file
1
webapp/js/views/recents/recents.html
Normal file
@@ -0,0 +1 @@
|
||||
<h1> Albums Récents </h1>
|
||||
20
webapp/js/views/recents/recents.js
Normal file
20
webapp/js/views/recents/recents.js
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('satbd.satellite.bar.views.recents',[
|
||||
'ngRoute'
|
||||
]).config(function($routeProvider) {
|
||||
$routeProvider.when('/recents', {
|
||||
templateUrl: 'js/views/recents/recents.html',
|
||||
controller: 'RecentsCtrl'
|
||||
});
|
||||
}).controller('RecentsCtrl', function( $scope, $http, $log) {
|
||||
$scope.albumIDs = [];
|
||||
$http.get('/api/recents')
|
||||
.success(function(data) {
|
||||
for (var i=0; i < 10; i++) {
|
||||
$scope.albumIDs.push(data[i]);
|
||||
}
|
||||
}).error(function(err){
|
||||
$log.error(err);
|
||||
});
|
||||
});
|
||||
2
webapp/js/views/search/search.html
Normal file
2
webapp/js/views/search/search.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<h1> Votre recherche de '{{ terms }}' n'a pas abouti</h1>
|
||||
<h3>C'est toujours pas implémenté, couillon</h3>
|
||||
12
webapp/js/views/search/search.js
Normal file
12
webapp/js/views/search/search.js
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('satbd.satellite.bar.views.search',[
|
||||
'ngRoute'
|
||||
]).config(function($routeProvider) {
|
||||
$routeProvider.when('/search', {
|
||||
templateUrl: 'js/views/search/search.html',
|
||||
controller: 'SearchCtrl'
|
||||
});
|
||||
}).controller('SearchCtrl', function($scope,$routeParams) {
|
||||
$scope.terms=$routeParams.q;
|
||||
});
|
||||
1
webapp/js/views/series/series.html
Normal file
1
webapp/js/views/series/series.html
Normal file
@@ -0,0 +1 @@
|
||||
<h1>Par Séries</h1>
|
||||
9
webapp/js/views/series/series.js
Normal file
9
webapp/js/views/series/series.js
Normal file
@@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('satbd.satellite.bar.views.series',[
|
||||
'ngRoute'
|
||||
]).config(function($routeProvider) {
|
||||
$routeProvider.when('/series', {
|
||||
templateUrl: 'js/views/series/series.html'
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user