use MongoDB ObjectId as unique IDs
This commit is contained in:
parent
8a1834e509
commit
1c993c147c
4 changed files with 6 additions and 5 deletions
|
@ -17,7 +17,7 @@
|
|||
|
||||
<ul class="events">
|
||||
<li ng-repeat="event in events | filter:query | orderBy:orderProp">
|
||||
<span><a href="/#/events/{{event.id}}">{{event.title}}</a></span>
|
||||
<span><a href="/#/events/{{event._id}}">{{event.title}}</a></span>
|
||||
<p>{{event['begin-datetime']}}</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
1
angular_app/js/controllers.js
vendored
1
angular_app/js/controllers.js
vendored
|
@ -3,6 +3,7 @@
|
|||
/* Controllers */
|
||||
var eventManControllers = angular.module('eventManControllers', []);
|
||||
|
||||
|
||||
eventManControllers.controller('navigation', ['$location',
|
||||
function ($location) {
|
||||
this.go = function(url) {
|
||||
|
|
6
angular_app/js/services.js
vendored
6
angular_app/js/services.js
vendored
|
@ -2,7 +2,7 @@ var eventManServices = angular.module('eventManServices', ['ngResource']);
|
|||
|
||||
eventManServices.factory('Event', ['$resource',
|
||||
function($resource) {
|
||||
return $resource('events/:id', {id: '@id'}, {
|
||||
return $resource('events/:id', {id: '@_id'}, {
|
||||
all: {
|
||||
method: 'GET',
|
||||
isArray: true,
|
||||
|
@ -18,10 +18,10 @@ eventManServices.factory('Event', ['$resource',
|
|||
|
||||
eventManServices.factory('Person', ['$resource',
|
||||
function($resource) {
|
||||
return $resource('persons/:id', {id: '@id'}, {
|
||||
return $resource('persons/:id', {id: '@_id'}, {
|
||||
all: {
|
||||
method: 'GET',
|
||||
isArray:true,
|
||||
isArray: true,
|
||||
transformResponse: function(data, headers) {
|
||||
return angular.fromJson(data).persons;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<ul class="persons">
|
||||
<li ng-repeat="person in persons | filter:query | orderBy:orderProp">
|
||||
<a href="/#/persons/{{person.id}}"><span>{{person.name}}</span> <span>{{person.surname}}</span></a>
|
||||
<a href="/#/persons/{{person._id}}"><span>{{person.name}}</span> <span>{{person.surname}}</span></a>
|
||||
<p>{{person.email}}</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue