I have 2 layout files. Layout-1 Layout-2
The route /one
is the starting point which loads the Layout-1
, but now if I click on a link /two
it gets me the file, but with Layout-1
, instead i want, if i hit /two
, Layout-2
should be loaded.
If i refresh the page, i get the correct thing coz that time i hit the server directly. So is there any way from angular to specify which layout file to load from Server.
Thanks.
Loading new layout template means loading new html embedded with new javascript and css files.
This is equal to redirecting page to new location. You can use $window.location.href="new/layout/template"
. Read angularjs developer guide for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With