Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@JIntrocaso
Created September 21, 2020 01:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JIntrocaso/5cb1e8eed27c49ba638389e28550f37c to your computer and use it in GitHub Desktop.
Save JIntrocaso/5cb1e8eed27c49ba638389e28550f37c to your computer and use it in GitHub Desktop.
Trigger File Downloads
ngOnInit(): void {
this.thankYouDetails = this.campaign.thankYouMessage;
this.downloadMaterials(this.campaign.materials);
}
public downloadMaterials(materials: Material[]) {
materials.forEach(m => {
window.location.href = m.metadata.file.url;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment