Hi following is my html code
<th style="width:90px">
<span>ID</span><img class="serverRP_ajax-loader" src="loader_green_32.gif" /><input type="text" id="abc" ng-model="rpFilter.ResourcePlanID.value" />
</th>
I want to enable loader_green_32.gif only when there is some value enter in abc textbox. $dirty is not possible because I am not using form tag
You can add
ng-if="rpFilter.ResourcePlanID.value"
to theimage tag
.This will make that image visible only if you enter the value in textbox.
Here is a working EXAMPLE
Note: If you want to just check whether field is modified or not, then you need to use
$dirty
and for that you have to definitely takeformtag
Here is how it goes,
You should use name of attribute,
ng-if="myForm.resourceplanid.$dirty"