<p dir="auto">When making a typo in the template of forgetting to include the directive in the component, the attribute silently gets removed without any warning.</p>
<p dir="auto">Example:<br>
&lt;a [routeLink]="['Something']"&gt;Go to Something<br>
where 'routeLink' is a typo and should be 'routerLink'.</p>
<p dir="auto">Would there be a way to provide a warning when this happens, maybe together with a list of available directives?</p>
<p dir="auto">In the ideal world we should be able to detect "dangling" attributes. In the <code class="notranslate">&lt;div foo&gt;</code> example we should report <code class="notranslate">foo</code> as "dangling" when:</p>
<ul dir="auto">
<li>foo is not a valid HTML attribute (how come should we identify valid attributes? From a spec / schema?)</li>
<li>there is no matching directive</li>
<li>it wasn’t consumed by a binding / event handler / var declaration / other ng-specific construct</li>
<li>it is not prefixed with <code class="notranslate">data-</code> (?)</li>
</ul>
<p dir="auto">In practice "dangling" attributes in templates are most probably attributes are introduced due to:</p>
<ul dir="auto">
<li>typos</li>
<li>forgetting to add a directive (in the <code class="notranslate">directives</code> for the <code class="notranslate">@View</code> annotation) that should match a given attribute</li>
</ul>