Search code examples
angularangular7

Page is not loaded properly on navigation using Angular 7


when i try to navigate different component. only html is rendering as output. and below that previous screen design is coming. if i clicked again somewhere on the screen. the page is loading correctly. i didnt get any errors on console. the same way im getting the problem on submiting the form. on first time clicking the submit button none of the validation is triggering if i clicked somewhere on the screen again. the validation is hitting. i couldntt identityfy the root cause of this issue

router link:

this.router.navigate("master/finance/currency", { queryParams: { screenId: 3 } });

im passing the url dynamically

Expected output: the component should be loaded completly when i click the router link once and when clicking submit button once validation should be hitted.

Can anyone give solution for this?


Solution

  • I got a solution for this issue. Actually this issue is not due to the routing. In constructor i have initialized many services. in one of my services Excel service the version was higher that was not supported in angular 7. i have degraded the version of excel js that works in angular 7.Now i can able to navigate to any of the screens without any issue

    I have founded this issue by commenting the services one by one in the constructor