I am encountering difficulties with implementing ng-show
and $pristine
.
Below is the code snippet (also available on CodePen):
<blockquote ng-show="!comment.author.$pristine && !comment.rating.$pristine && !comment.comment.$pristine">
<p>{{comment.rating}} Stars</p>
<p>{{comment.comment}}</p>
<footer>{{comment.author}}
</blockqoute>
My intention is to display the div containing duplicate information only when all form fields are filled, hiding it otherwise.
I attempted to achieve this using
!comment.[index].$pristine && ....
However, my approach did not yield the desired result where the blockquote becomes visible once all fields have been completed.