在Angular中,当使用Google OAuth进行重定向时,可能会抛出错误。以下是解决该问题的一种方法:
import { Router } from '@angular/router';
constructor(private router: Router) {}
this.router.navigateByUrl('/redirect-url');
将'/redirect-url'替换为你的重定向链接。
这种方法可以帮助你解决在Angular中使用Google OAuth时出现的重定向链接抛出错误的问题。