AngularJS: How to clear query parameters in the URL?

后端 未结 16 2671
余生分开走
余生分开走 2020-12-04 14:40

My AngularJS application needs to have access to the user\'s LinkedIn profile. In order to do that I need to redirect the user to a LinkedIn URL which contains a callback re

16条回答
  •  北荒
    北荒 (楼主)
    2020-12-04 15:45

    I ended up getting the answer from AngularJS forum. See this thread for details


    The link is to a Google Groups thread, which is difficult to read and doesn't provide a clear answer. To remove URL parameters use

    $location.url($location.path());
    

提交回复
热议问题