angular项目要求在路由跳转时重新打开一个新页面,除了a标签的target="_blank"之外,还有什么办法实现?
routerLink="/infoVariety/centerNews" target="_blank">更多>>
html代码
<nz-carousel [nzAutoPlaySpeed]="3000" nzAutoPlay='true' style="height:750px;background-color: #ffffff;">
<div nz-carousel-content *ngFor="let index of carousels">
<img src="{{index.img}}" (click)="goContent(index)"
style="background-size:100% 100%; width:1260px;height: 600px; cursor: pointer;">
<div nz-row class="news">
<div nz-col>
<span class="wSpan">
{{ index.title }}
span>
div>
div>
div>
nz-carousel>
对应的ts代码
goDetail(e) {
console.log("点击成功");
console.log("我看下这个能不能获取到id", e);
localStorage.setItem("detailtit", e.title);
localStorage.setItem("detailtime", e.time);
localStorage.setItem("detailcontent", e.content);
localStorage.setItem("detailImg", e.fileid);
this.router.navigate(["/detail"])
}
在ts中如何实现路由跳转的同时打开一个新页面显示内容