angulartics2 icon indicating copy to clipboard operation
angulartics2 copied to clipboard

Handle router change on some specific routes

Open MortezaT opened this issue 7 years ago • 3 comments

Note: for support questions, please use one of these channels: Chat: Gitter

  • I'm submitting a ... [ ] bug report [*] feature request [ ] question about the decisions made in the repository

On some routes I set the page title and meta description related on corresponding data which is available after NavigationEnd event. It would be great if there was a way to postpone Analytics request until data fetch completed.

MortezaT avatar Feb 24 '18 17:02 MortezaT

see this: https://github.com/angulartics/angulartics2/issues/112#issuecomment-364231019

timelf123 avatar Feb 26 '18 17:02 timelf123

@timelf123 The solution is really nice if all title happend to be set by one method, but in my case each page handles it's own way to extract the title correspond to it's data.

MortezaT avatar Mar 27 '18 05:03 MortezaT

For example on page one it uses data of model A and set title like this:

A.username - page one's | sitename

and for page two it uses model B:

B.title | sitename

MortezaT avatar Mar 27 '18 05:03 MortezaT