<tr>
<td><input type="checkbox" ng-model="<%=cat4%>" ng-checked="true"> </td>
<td>
<%=cat2%>
</td>
<td><input type="text" class="txt" ng-show="<%=cat4%>" placeholder="Enter Price per <%=cat2%>" value="<%=temps[i]%>"></td>
</tr>
I want to display the text box when checkbox is checked. The checkbox is by default checked. When the check box is unchecked then the text box should be hidden. Using the above code the checkbox is checked but the textbox is not displayed (when the form loads). When I uncheck and again check the checkbox then only the text box is displayed. What changes are needed in the code?