【问题标题】:How to change the page title with title from backend如何从后端更改带有标题的页面标题
【发布时间】:2022-06-14 22:59:46
【问题描述】:

我想用后端的标题更改我的 Angular 应用程序的页面标题。我使用了 angular Title 服务,但这并没有解决问题, 到目前为止,这是我在应用程序组件中的代码:

 ngOnInit(): void {
    this.page = this.visuals.pageTitle;
    this.visualsService.getVisuals().subscribe((res: any) => {
      this.visuals = res;
      this.title.setTitle(this.visuals.pageTitle);
    });
  }

还有其他解决办法吗?

【问题讨论】:

  • 订阅执行了吗?

标签: angular page-title


猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-04-29
相关资源
最近更新 更多