Requirement:
We need to open a php page on a new window. We have achieved like this way as shown below
.html code
<a target="_blank" href="{{pdf}}">Download Pdf</a>
.ts code
ngOnInit()
{
this.loggedinuser = localStorage.getItem("USERNAME");
console.log(this.loggedinuser);
this.pdf = 'http://219.90.67.154/report-service/quicktask/TCPDF/examples/test-tcpdf.php?loggedinuser='+this.loggedinuser;
}
But we want to achieve it differently. Need to click a button from html, which will call a function, from this function everything should happen.
.html
<button ion-button (click)="saveit">Save</button>
.ts
saveit(){
// the url,html tag should be called from here , how ?
}