Concatenate strings and variable values in angular html template

Just use the simple quotes ' and + sign inside the double quotes of the html attribute value. See the value of the href attribute below:

<div class="float-right mt-1">
    type="button" class="btn btn-light btn-sm float-right"
    href="mailto:?subject=Code snippet: &body="
    title="Share link to snippet via Email">
    <i class="far fa-envelope"></i> Email

Reference -

Shared with from Use the Copy to mine functionality to copy this snippet to your own personal collection and easy manage your code snippets.

Subscribe to our newsletter for more code resources and news

Adrian Matei

Adrian Matei
Life force expressing itself as a coding capable human being

How to resize pictures from folder in Node.js with Jimp

Simple api tool implementation on localhost to resize from folder in Node.js with Jimp Continue reading