Angular cast select value to int
<p>I have a form with different selects like : </p>

<pre><code>&lt;select [(ngModel)]="selected.isConnected" (ngModelChange)="formChanged()" name="etat" id="etat" class="form-control"&gt;
    &lt;option value="0"&gt;Not connected&lt;/option&gt;
    &lt;option value="1"&gt;Connected&lt;/option&gt;
&lt;/select&gt; 
</code></pre>

<p>My backend expect to receive an int in the "isConnected" attribute. Unfortunately as soon as I change the value of the select the attribute is cast to a string : </p>

<pre><code>{
    isConnected : "0", // 0 expected
}
</code></pre>

<p>For standard <code>&lt;input&gt;</code> I could use <code>type="number"</code> but for a <code>&lt;select&gt;</code> I'm clueless.</p>

<p>Is there a way to force angular 2 to cast the data to int ?</p>