mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-05 12:11:51 +02:00
Untracked Config File
This commit is contained in:
parent
c74b397836
commit
aaf75b4402
17 changed files with 234 additions and 147 deletions
|
@ -1,13 +1,27 @@
|
|||
angular.module('rallly')
|
||||
.controller('EventCtrl', function($scope, $http, $state, Title, Event, ConfirmModal){
|
||||
var id = $state.params.id;
|
||||
// Get Event
|
||||
$scope.event = Event.get({id:id}, function(data){
|
||||
// Set the page title to the event title
|
||||
Title.set($scope.event.title);
|
||||
// Generate event url - i.e. http://rallly.co/jF9F_Fd
|
||||
$scope.eventUrl = $state.href('event', {
|
||||
id: $scope.event._id
|
||||
}, {
|
||||
absolute : true
|
||||
});
|
||||
var examplesNames = ['John Example', 'Jane Specimen','Mark Instance', 'Mary Case'];
|
||||
$scope.event.examples = [];
|
||||
for (var i = 0; i < examplesNames.length; i++){
|
||||
var example = { name : examplesNames[i] };
|
||||
example.dates = [];
|
||||
for (var j = 0; j < $scope.event.dates.length; j++){
|
||||
var answer = Math.random()<.5;
|
||||
example.dates[j] = answer;
|
||||
}
|
||||
$scope.event.examples.push(example);
|
||||
}
|
||||
}, function(e){
|
||||
$state.go('notfound');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue