kopia lustrzana https://github.com/FacilMap/facilmap
Fix strange bug where select boxes in edit marker/line are not initialised properly (#39)
rodzic
f520be612d
commit
348f1ca4f4
|
@ -38,8 +38,12 @@
|
|||
el.attr("id", attrs.fmTypeFieldId);
|
||||
|
||||
el.appendTo(element.empty());
|
||||
$compile(el)(scope);
|
||||
scope.$evalAsync(); // $compile only replaces variables on next digest
|
||||
|
||||
// For some reason, if we call $compile directly, select boxes will not select the right value
|
||||
// with newer versions of angular
|
||||
scope.$evalAsync(function() {
|
||||
$compile(el)(scope);
|
||||
});
|
||||
};
|
||||
|
||||
scope.$watch(attrs.fmTypeField+".type", update);
|
||||
|
|
Ładowanie…
Reference in New Issue