How to refresh a route's resolved data

前端 未结 4 1362
执笔经年
执笔经年 2021-01-04 01:09

Consider the following route configuration:

const routes: Routes = [
  {
    path: \'\',
    component: AppComponent,
    resolve: {
      app: AppResolver
          


        
4条回答
  •  时光取名叫无心
    2021-01-04 01:49

    There is a parameter you can use in your route configuration called 'runGuardsAndResolvers' that will affect when the resolver runs. In this case you would want to set it to 'always'. This means that the resolver will run any time the child routes of that route change. See the route documentation for more information.

提交回复
热议问题