javascript - How to show a pdf file in different window on button click in Angular 4 -


i new angular 2. inside index.html have directive inside of whole display coming. inside of have 3 directives.

<app-header></app-header> <app-content></app-content> <app-footer></app-footer> 

inside of contents have button, on click of want show pdf file, stored in project, in different window. in window pdf there, no other header or footer. how that. it's html code-

<div class="col-md-8">      designed address massive data processing telecom data, storage , real-time analytics on cloud. reports , alarms on handheld.                                              <p><a class="btn-u btn-u-sm" target="_blank" [routerlink]="['files/skybase.pdf']">download <i class="fa fa-angle-double-right margin-left-5"></i></a></p> </div> 

i don't understand write in app.module.ts routing , showing pdf.

please me.

i think should not use angular routing here. add simple link pdf file location (full url), use _target=blank, open in new tab. example:

<a href="http://www.thesitewizard.com/"; target="_blank">thesitewizard.com</a> 

angular routing meant work without reloading same page, kinda out of scope angular. angular meant writing spa (single page applications) , opening in new tab out of scope.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -