I am using AngularJs ng-show, ng-hide for a control and also am using show(), hide() in javascript in different situations. But only the ng-show and ng-hide is working and not allowing jQuery show() and hide().
For the below div I have used ng-show and it's working fine:
<div class="generic_error_message" id="genericmsg" ng-show="(QuoteNew.$invalid && submitted) ||(QuoteNew.Birthdate.$pristine && submitted)">
For the same div I am using jQuery for a different condition after doing some service calls :
if (!formvalid || !dependentvalid || !InsExistvalid1 || !InsExistvalid2 || postcodeValid || ($('#getQuote').hasClass('ng-invalid')) || !validDependents)
{
e.preventDefault();
$("#genericmsg").show();
}
here show() doesn't work...
Struggling to solve it. Please someone help me...
doing some service calls, so either he is changing the DOM outside Angular directives, or worse, he is making service calls in the directive (please use a controller). See @Erik Honn's answer