While working on a directive calendar, I encountered an issue:
I am integrating dynamic tables and want to filter based on an ngModel from the parent controller, but I am facing difficulties in capturing the changes of the ngModel when using dynamic tables and attributes.
Below is the code snippet:
HTML
<li class="checkbox">
<input type="checkbox" ng-model="confirm.is_true" checked class="checked-blue">
<label>Confirm</label>
</li>
JS
function createBar(kind) {
var _span = document.createElement("div");
switch(kind){
case "initial":
var _img = document.createElement("img");
var _text = document.createTextNode("Test");
_img.src = "/uploads/photo/27/sq135_DSC_0011.JPG";
_span.appendChild(_img);
_span.appendChild(_text);
_span.className = "bar-init";
_span.setAttribute("ng-hide", "confirm.is_true");
break;
case "middle":
_span.className = "bar-middle";
break;
case "end":
_span.className = "bar-end";
break;
}
return _span;
}
Thank you