[SalesForce] Build a clickable URL passing more than 1 parameter in lightning component

I want to build a clickable URL inside my lightning component as given below

<a aura:id="child321" 
   href="{!'/apex/viewAllRegionsVerticalHierarchyCR?id='+v.acco‌​untId1+'&Region='+it‌​em.key}"
>
   <h3>
      View all<br/>
      {!item.value} Children<br/>
      Of {!item.key} Region
   </h3>
</a>

But upon saving given ParseError is coming because of & character.I tried using escape character but with no avail.
–The reference to entity "Region" must end with the ';' delimiter.

Best Answer

Maybe you can replace & by

&amp;

to have :

<a aura:id="child321" href="{!'/apex/viewAllRegionsVerticalHierarchyCR?id='+v.acco‌​untId1+'&amp;Region='+it‌​em.key}"> <h3>View all<br/>{!item.value} Children<br/>Of {!item.key} Region</h3></a>

This is the value to use in evaluable conditional expressions so maybe it's the same inside an expression string

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/expr_operators.htm (Logical Operators paragraph)

Related Topic