Merge pull request #2366 from normanjaeckel/FixTemplateHooks
Fixed bug in templateHook directive. Fixed #2362.
This commit is contained in:
commit
a0acf75f08
@ -277,9 +277,14 @@ angular.module('OpenSlidesApp.core', [
|
|||||||
template: '',
|
template: '',
|
||||||
link: function (scope, iElement, iAttr) {
|
link: function (scope, iElement, iAttr) {
|
||||||
var hooks = templateHooks.hooks[iAttr.hookName];
|
var hooks = templateHooks.hooks[iAttr.hookName];
|
||||||
var html = hooks.map(function (hook) {
|
var html;
|
||||||
|
if (hooks) {
|
||||||
|
html = hooks.map(function (hook) {
|
||||||
return '<div>' + hook.template + '</div>';
|
return '<div>' + hook.template + '</div>';
|
||||||
}).join('');
|
}).join('');
|
||||||
|
} else {
|
||||||
|
html = '';
|
||||||
|
}
|
||||||
iElement.append($compile(html)(scope));
|
iElement.append($compile(html)(scope));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user