/**
* Created by cklimkowsky on 1/28/15.
*/
angular
.module('coopEval')
.directive('ceLikertQuestion', likertQuestion);
function likertQuestion($modal) {
return {
restrict: 'A',
scope: {
question: '=',
form: '=',
submitted: '='
},
link: function (scope, element, attrs, ctrl) {
scope.openAddCommentModal = function (size) {
var modalInstance = $modal.open({
templateUrl: 'partials/form/add-comment-modal.html',
controller: 'AddCommentModalController',
size: size,
resolve: {
question: function() {
return scope.question;
}
}
});
modalInstance.result.then(function (question) {
scope.question = question;
});
};
},
templateUrl: 'partials/form/likert-question.html'
}
} |