angular2 and templates - how to do a string replace in routerlink
<p>I have an angular2 template syntax that looks like this:</p>

<pre><code>&lt;tr  *ngFor="let iter of top_cities"&gt;
  &lt;td&gt;&lt;a [routerLink]="['test',state, iter.key ]"&gt; {{iter.key | titleCase }}&lt;/a&gt;&lt;/td&gt; 
</code></pre>

<p>HoweverI need to do something like this:</p>

<pre><code>&lt;tr  *ngFor="let iter of top_cities"&gt;
   &lt;td&gt;&lt;a [routerLink]="['test',state, iter.key.replace(' ','-') ]"&gt; {{iter.key | titleCase }}&lt;/a&gt;&lt;/td&gt; 
</code></pre>

<p>That is in the iter I need to replace a city name with a space with a hyphen.  How do I do that?</p>

<pre><code>  [routerLink]="['test',state, iter.key.replace(' ','-') ]"
</code></pre>

<p>Thanks</p>