title: Angular: routing resolver placement
body: <p>Does it matter where the <code>resolver</code> exists in Angular in these two examples? Both of these two snippets of code achieve the same result:</p>
  <p><strong>Placing the resolver at the module-level within <code>AppModule</code>:</strong></p>
  <pre class="lang-js prettyprint-override"><code>const routes: Routes = [
    {
      path: 'user',
      resolve: {
        user: UserResolver
      },
      loadChildren: () =&gt; import('./user/user.module').then(m =&gt; m.UserModule)
    },
  ];
  </code></pre>
  <p><strong>vs. placing it directly on the component (with children routes) for the routing defined inside the <code>UserModule</code>:</strong></p>
  <pre class="lang-js prettyprint-override"><code>const routes: Routes = [
    {
      path: '',
      component: UserComponent,
      resolve: {
        user: UserResolver
      },
      children: [
        {
          path: 'details',
          component: DetailsComponent,
        },
        {
          path: 'change-password',
          component: ChangePasswordComponent,
        },
      ],
    },
  ];
  </code></pre>
  <p>What is the difference between resolving the data at the module level, vs. resolving it at the component level, with <code>children</code> routes?</p>