Merge pull request #1638 from ostcar/projector-js-data-replace
Configure js-data for projector elements to "replace" on inject.
This commit is contained in:
commit
04fc25ffd0
@ -158,9 +158,21 @@ angular.module('OpenSlidesApp.core', [
|
|||||||
});
|
});
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
/* Model for a projector.
|
||||||
|
*
|
||||||
|
* At the moment we use only one projector, so there will be only one object
|
||||||
|
* in this model. It has the id 1. For later releases there will be multiple
|
||||||
|
* projector objects.
|
||||||
|
*
|
||||||
|
* This model uses onConfilict: 'replace' instead of 'merge'. This is necessary
|
||||||
|
* because the keys of the projector objects can change and old keys have to
|
||||||
|
* be removed. See http://www.js-data.io/docs/dsdefaults#onconflict for
|
||||||
|
* more information.
|
||||||
|
*/
|
||||||
.factory('Projector', ['DS', function(DS) {
|
.factory('Projector', ['DS', function(DS) {
|
||||||
return DS.defineResource({
|
return DS.defineResource({
|
||||||
name: 'core/projector',
|
name: 'core/projector',
|
||||||
|
onConflict: 'replace',
|
||||||
});
|
});
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user