I have an angular 2 component and you need to switch to a different route, but in a different browser tab. Below the code moves to the same browser tab.
import { Component } from '@angular/core'; import { Router } from '@angular/router'; @Component({ templateUrl: 'quotes-edit.component.html' }) export class QuoteComponent { constructor(private router: Router) { } this.router.navigate(['quote/add']); }
You would not use a corner router for this, but instead you could make a function that has the following
openinbrowserclicked(url) { window.open( 'url', '_blank', 'toolbar=no,resizable=yes,scrollbars=yes' ); }
Source: https://habr.com/ru/post/1013602/More articles:jquery expects for loop to complete before executing previous events - javascriptSource Code for Google Gradle Plugin for Creating Android - pluginsDifference between APIView class and view class? - djangoWhy does gcc hide overloaded functions in the global namespace? - c ++TypeError: Cannot read the 'error' property from undefined in React Chrome Extension - javascriptFailed to connect to WebSocket: WebSocket handshake error: unexpected response code: 400 - javascriptHow to switch to angular2 tab to a new tab - angularAngular 2 Routing Run in a New Tab - angularSlack & Gitlab web host integration not working - gitlabHow to vertically align list to list using flexbox? - htmlAll Articles