title: send whatsapp message from angular 2 web app
body: <p>Building a web app using angular 2, (or 4). Want to send a message through whatsapp. This works fine <code>whatsapp://send?text=hi!</code> to open whatsapp from the browser. I want to send the url of the current page. I can use {{url}} to print the url on the web page but I don't know how to set text={{url}} if you know what I mean. </p>
  
  <p>relevant part of the component `</p>
  
  <pre><code>export class ActivityDetailsComponent implements OnInit {
  
  
    @Input() activity: any;
    @Output() close = new EventEmitter();
    error:any;
    navigated = false;
    sub: any;
    imageURL: string;
    location:Location;
    url: any;
  
    constructor(private activitiesService:ActivitiesService,
                  private route: ActivatedRoute,
                  private router: Router,
                  private pics: PicsService,
                  location:Location             
  
                  ) { 
  
                  this.location = location;
                  this.url = this.location.path();
  
                   }
  </code></pre>
  
  <p>`</p>
  
  <p>relevant html 
  ` </p>
  
  <pre><code>    Send a link to this activity to your
       &lt;a href="whatsapp://send?text=http://ec2-52-209-95-130.eu-west-  
   1.compute.amazonaws.com:4200/activities/58c003d47513092fac820f09"&gt;whatsapp&lt;/a&gt;
       contacts  
  
      http://ec2-52-209-95-130.eu-west-1.compute.amazonaws.com:4200{{url}}
  </code></pre>
  
  <p>`</p>