I have an app in Angular2 and I need to navigate outside of app. I Have simple view:
...
<a [routerLink]="library.url" target="_blank" (click)="goToPage(library.url)">{{library.url}}</a>
...
and I want to navigate to library.url, I have method for navigation:
      goToPage(url: string)
      {
         //What should be here for navigation outside?
      }
Or exists another way to do that?
you can set the global window-location of your Browser in your code, to navigate to your url:
goToPage(url: string): void {
    window.location.href = url;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With