Git Repository Public Repository

YouAndWeb_TwoToc

URLs

Copy to Clipboard
 
e86e768a66d1367f873e3a66194451f52484f39f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'use strict';

angular.module('dashboardApp')
  .controller('ShowOrgaCtrl', function($scope, $http, $stateParams) {
    
    $scope.posters = [];
    var showId = $stateParams.id;

    $http.get('/api/shows/' + showId).then(function(response) {
      	$scope.item = response.data;
      	$scope.diffDate = Math.abs(new Date() - Date.parse($scope.item.user.dateSubscribed));

      	$scope.loadComments();
    });

    var baseLimit = 5;
    $scope.limit = baseLimit;

    $scope.loadComments = function() {
    	$http.get('/api/comments?user=' + $scope.item.user._id + '&active=true&limit=' + $scope.limit).then(function(response) {
    	  	$scope.comments = response.data;
    	  	$scope.limit += $scope.limit;
    	});
    };
  });

Commits for YouAndWeb_TwoToc/client/showOrga/showOrg.controller.js

Diff revisions: vs.
Revision Author Commited Message
a98e8d ... FSinnona picture FSinnona Thu 26 Nov, 2015 13:26:45 +0000

Creazione organizza