url routing - Why Are Views not Loaded via XHR in Angular 4? -


maybe dumb question would've gotten answered after more digging in docs, heck. why aren't components' views (templates) not being loaded via xhr ( case in angularjs apps )? set first router wired in couple of components , menu items in 'master' template. whenever click navigate, page reloads new view, versus being displayed flicker/reload-free via xhr in angularjs.

well easy. have use 'routerlink=' rather 'href=' route links in template.

<li class="nav-item">     <a class="nav-link" routerlink="/home">home <span class="sr-only">(current)</span></a> </li> 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -