Server Side Rendering with Angular and Node
I was using the server side rendering concept in Angular for UI and Server is on Node.js. So what I was doing is rendering the HTML Part when I hit API from Angular Component and that rendered part is shown on the Screen.
Now the Problem is their are some anchor TAGS with href
example- href='/dashboard/cop/batting'
HTML rendered from API.
Now when I click this link my whole angular application RESTARTS and from app.module.ts then sets routing.
This takes and lots of time and disturb my APP flow.
I have also tried href='/#/dashboard/cop/batting'
which i was get from this Article
What i want is to RESTART the whole application just Stay on that respective component and do the WORK.
使用href创建这个问题它会重新加载页面,你应该使用[routerLink]指令来改变路由
链接地址: http://www.djcxy.com/p/31374.html上一篇: 我们是否需要webpack进行角度通用?
下一篇: 带角度和节点的服务器端渲染