mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-25 06:46:23 +02:00
First Commit
This commit is contained in:
commit
2630cc237a
527 changed files with 104273 additions and 0 deletions
30
public/js/main.js
Normal file
30
public/js/main.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
angular.module('rallly', ['ui.router','ngResource','ngFx'])
|
||||
.config(function($stateProvider, $urlRouterProvider, $locationProvider){
|
||||
$locationProvider.html5Mode(true);
|
||||
$urlRouterProvider.otherwise("/notfound")
|
||||
$stateProvider
|
||||
.state('index',{
|
||||
url : '/',
|
||||
templateUrl : 'templates/new.html',
|
||||
controller : 'NewEventCtrl'
|
||||
})
|
||||
.state('about', {
|
||||
url : '/about',
|
||||
templateUrl : 'templates/about.html'
|
||||
})
|
||||
.state('notfound', {
|
||||
url : '/notfound',
|
||||
templateUrl : 'templates/notfound.html'
|
||||
})
|
||||
.state('event',{
|
||||
url : '/:id',
|
||||
templateUrl : 'templates/event.html',
|
||||
controller : 'EventCtrl'
|
||||
})
|
||||
})
|
||||
.factory('Event', function($resource){
|
||||
return $resource('/api/event/:id', { id : '@_id' });
|
||||
})
|
||||
.factory('Participant', function($resource){
|
||||
return $resource('/api/event/:id/participant/:pid', { id: '@_id', pid : '@pid'});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue