de=&quot;error-messages&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>
<p>However, including generic messages may not be useful enough to match all input fields, therefore,
<code>ngMessages</code> provides the ability to override messages defined in the remote template by redefining
them within the directive container.</p>
<pre><code class="lang-html">&lt;!-- a generic template of error messages known as &quot;my-custom-messages&quot; --&gt;
&lt;script type=&quot;text/ng-template&quot; id=&quot;my-custom-