B
B
Bogdan2021-11-11 00:26:51
Angular
Bogdan, 2021-11-11 00:26:51

Determine whether there was a transition or page refresh?

Hello. Don't tell me?
ngx-translate is used to change the language. When there is a normal transition to the SPA, then everything works fine only once the getConditions methods . But when the page is refreshed. then the translateService.onLangChange subscription is already triggered .

ngOnInit() {
    this.getConditions();

    this.subscription.add(
      this.translateService.onLangChange.subscribe(() => this.getConditions())
    );
  }


How can this be bypassed? Whether it is possible to define somehow that there was a transition to the page in SPA or its updating on F5? Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question