now there are some requirements that need to do a global refresh function. Of course, refresh is to update the data of the current routing component. Previously, I wanted to subscribe to events directly in the currently routed component through rxjs, but I found a problem that I could not subscribe to this event.
I am currently using this function point on the outermost layout layout.
box-
-header
- refresh()
-body
- router
- components
-footer
{
path:"",
component:layoutComponent,
children:[
{
path:"",redirectTo:"/xxx",
},
{
path:"xxx",
loadChildren:"xxx/xxx.module-sharpxxxModule"
}
]
}
of course, I access this xxx path, but the refresh is performed in the headerComponent (header) in layoutComponent. This action is not intercepted in the subject launch and subscription events using the global rxjs. Ask the master how to deal with this.