No provider for NgModel! while creating Structural directive
<p>I created an structural directive. Here is the constructor of that class.</p>

<pre><code>constructor(private templateRef: TemplateRef&lt;any&gt;, private viewContainer: ViewContainerRef, public query: NgModel) {
    console.log(this.query)
}
</code></pre>

<p>If I remove <code>public query:NgModel</code>, it works fine. If I add it It throws error.</p>

<p><code>Error: Uncaught (in promise): No provider for NgModel! (ControlMeta -&gt; NgModel)</code></p>

<p>What is the error here?</p>

<p>I did same for normal directive, it is working fine.</p>