router icon indicating copy to clipboard operation
router copied to clipboard

feat: Support default exports

Open brandonroberts opened this issue 3 years ago • 0 comments

When lazy loading NgModules and Components, support loading them without the .then and allow them to be exported as default.

import { Component } from '@angular/core';

@Component({
  template: `
    <router>
      <route path="/lazy" [load]="components.lazy"> </route>
    </router>
  `,
})
export class MyComponent {
  components = {
    lazy: () => import('./lazy/lazy.component')
  };
}

brandonroberts avatar May 30 '22 23:05 brandonroberts