21 lines
500 B
JavaScript
21 lines
500 B
JavaScript
'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);
|
|
});
|
|
});
|