Get title of an existing page in angularjs

Is there a way to get the title of the current page in angularjs without making a separate call? I cannot find this in the documents anywhere, but it seems that it should be possible.

eg. if index.html contains angular code, how can I read the header of the original request to get index.html ? I could use $http to call again, but that seems unnecessary.

+6
source share
1 answer

If you do not process the http request, you will not have access to the request or the answer, unless the code that it does does not provide any information what is wrong. So sorry, but the answer is no.

However, if I can: what exactly is needed from the response header? Since there may be other ways to get header information (like cookies)

+4
source

Source: https://habr.com/ru/post/977208/


All Articles