
  &lt;div ng-if=&quot;showRequiredError&quot;&gt;
    &lt;div ng-message=&quot;required&quot;&gt;Please enter something&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>
<h2 id="animations">Animations</h2>
<p>If the <code>ngAnimate</code> module is active within the application then the <code>ngMessages</code>, <code>ngMessage</code> and
<code>ngMessageExp</code> directives will trigger animations whenever any messages are added and removed from
the DOM by the <code>ngMessages</code> directive.</p>
<p>