OpenSlides/openslides/topics/static/js/topics/projector.js
Norman Jäckel cab53f0434 Moved custom slides to own app topics for better app structure.
Renamed model to Topic. Added migrations file. Fixed #2402.
2016-09-21 15:00:23 +02:00

29 lines
687 B
JavaScript

(function () {
'use strict';
angular.module('OpenSlidesApp.topics.projector', ['OpenSlidesApp.topics'])
.config([
'slidesProvider',
function (slidesProvider) {
slidesProvider.registerSlide('topics/topic', {
template: 'static/templates/topics/slide_topic.html'
});
}
])
.controller('SlideTopicCtrl', [
'$scope',
'Topic',
function($scope, Topic) {
// Attention! Each object that is used here has to be dealt on server side.
// Add it to the coresponding get_requirements method of the ProjectorElement
// class.
var id = $scope.element.id;
Topic.bindOne(id, $scope, 'topic');
}
]);
})();