0

I have my Angular 5 project. After login, the router is running, but the router does not work when I refresh the page.

I have not tried this as a solution but it did not work. I would appreciate if you help.

Link:

1-> https://medium.com/engineering-on-the-incline/reloading-current-route-on-click-angular-5-1a1bfc740ab2

2-> How to reload the current route with the angular 2 router

Code:

            <li>
                <a routerLink="/profile">
                    <i class="fi flaticon-user"></i>
                    profile
                </a>
            </li>
m.savur
  • 39
  • 1
  • 5
  • Your question isn't very clear. Please specify what is your desired and current outcome. – SiddAjmera Feb 04 '19 at 15:01
  • thank you for answer. The router is running when the dom is first loaded. but does not reaction when I refresh the page. – m.savur Feb 04 '19 at 15:32
  • Can you please create a Minimal Working Sample StackBlitz, replicating this issue? That would really help understand what's wrong and what your issue actually is. – SiddAjmera Feb 04 '19 at 15:41
  • This code works in mac book. however, it does not work in Ipad. – m.savur Feb 04 '19 at 15:51

1 Answers1

0

Try this

 <li>
               <a [routerLink]="['/profile']">
                    <i class="fi flaticon-user"></i>
                    profile
                </a>
            </li>
Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
Raahul
  • 399
  • 1
  • 3
  • 11
  • thank you for answer. but it did not work. The router is running when the dom is first loaded. but does not reaction when I refresh the page. – m.savur Feb 04 '19 at 15:32
  • This code works in mac book. however, it does not work in Ipad. – m.savur Feb 04 '19 at 15:51