I've created an ngDialog
but I can't seem to access variables
and functions
in my controller
within it.
This is my code;
ngDialog.open({
template: 'mod-details',
className: "ngDialog-theme-large",
showClose: false,
closeByDocument: false,
closeByEscape: false,
data: {
orderItem: item
}
});
Any functions attached to elements within the ngDialog
that are in my controller
don't get called. Same for variables as well.
I have a ng-repeat
that repeats checkboxes
inside the ngDialog
<div class="group-items" ng-if="modifier.max_selection_points > 1 || (modifier.max_selection_points == 1 && modifier.min_selection_points == 0)">
<div ng-repeat="item in modifier.menu_modifier_items" class="modifier-item multiple">
<label for="<%modifier.id + '_' + item.id%>">
<input id="<%modifier.id + '_' + item.id%>"
class="checkbox-branded"
type="checkbox"
name="<%item.name%>"
ng-model="item.selected"
ng-class="{'not-available': !item.available}"
title="<%item.name%>"
value="<%item.id%>">
<span class="item-name">
<span ng-bind="item.name"></span>
<span ng-bind="priceDelta(modifier, item)"></span>
</span>
</label>
</div>
</div>
Any function I assign to ng-click
of the checkbox
doesn't get called. Also checking variables
and then deciding whether ng-disabled
is true also doesn't work.
It has no visibility of functions, variables in my controller
Any help appreciated