Encode string for URL (angular) : <p>I'm trying to encode a string that's pretty complex, so that I can include it in a mailto:</p>

<p>Component:</p>

<pre><code>&lt;a href="mailto:test@example.com?subject='Hello'&amp;{{body}}"&gt;
</code></pre>

<p>TS: </p>

<pre><code>import { HttpParameterCodec } from "@angular/common/http";

let body = encodeValue('This is the example body\nIt has line breaks and bullets\n\u2022bullet one\n\u2022bullet two\n\u2022bullet three')
</code></pre>

<p>When I try to use encodeValue, I get "cannot find name encodeValue.</p>

<p>How would be best to url-encode body?</p>
