Q:

Opening a .pptx file in an office add-in

I'm working on a webapplication add-in that is running in the taskpane window of PowerPoint.  The application gets .pptx files from a server and displays them using buttons so the user can select one.  
When the user selcts a file, it should open that file in a new window.  I found out how to open files using typescript, but they won't open or download when I use this in the add-in. 
This is the code I have tried:
async onClickTemplate() {
  window.location.href = 'file.pptx';
}

<button class="btn" (click)="onClickTemplate">Download</button>

They should work in a normal webapplication but when run in the PowerPoint taskpane, I only get an error in the taskpane.  There is no error code, just a pop-up Error.  Is there a workaround for this?  Or is there other code I can try for this? 

A:

Found out I needed to use open and then add the correct path and got it working after that. 
async onClickTemplate() {
    window.open('file.pptx')
  }

