在呼叫 API 以獲取資料時獲取 XSS 漏洞。所以試圖添加DOMSANITIZER,但它失敗了。試過下面的代碼,請給我建議解決方案。
this.http.get(this.domSanitizer.bypassSecurityTrustUrl(dataUrl),{headers:headers}).subscribe(response => {
this.persons = response.data.map(x=>({...x,check:false,test:x.firstName}));
this.dtTrigger.next();
});

我也保存了,你可以去那里查看。https://stackblitz.com/edit/column-names-as-tooltip-wcw1f7?file=app/app.component.ts
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/339574.html
