@angular/router#RouterOutlet TypeScript Examples

The following examples show how to use @angular/router#RouterOutlet. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: app.component.spec.ts    From 6PG-Dashboard with MIT License 6 votes vote down vote up
describe('AppComponent', () => {
  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [
        AppComponent
      ],
      imports: [ HttpClientModule ]
    }).compileComponents();
  }));

  it('should create the app', () => {
    const fixture = TestBed.createComponent(AppComponent);
    const app = fixture.componentInstance;
    expect(app).toBeTruthy();
  });

  it('should have a router outlet', () => {
    const fixture = TestBed.createComponent(AppComponent);
    const routerOutlet = fixture.debugElement.query(By.directive(RouterOutlet));  
    expect(routerOutlet?.nativeElement).toBeTruthy();
  });
});
Example #2
Source File: app.component.ts    From Angular-Cookbook with MIT License 5 votes vote down vote up
@ViewChild(RouterOutlet) routerOutlet;
Example #3
Source File: app.component.ts    From Angular-Cookbook with MIT License 5 votes vote down vote up
@ViewChild(RouterOutlet) routerOutlet;
Example #4
Source File: root.component.ts    From blockcore-hub with MIT License 5 votes vote down vote up
prepareRoute(outlet: RouterOutlet) {
        return outlet && outlet.activatedRouteData && outlet.activatedRouteData['animation'];
    }
Example #5
Source File: main-layout.component.ts    From dating-client with MIT License 5 votes vote down vote up
prepareRoute(outlet: RouterOutlet): string {
    return outlet?.activatedRouteData?.animation ?? '*';
  }
Example #6
Source File: auth-layout.component.ts    From dating-client with MIT License 5 votes vote down vote up
prepareRoute(outlet: RouterOutlet): string {
    return outlet?.activatedRouteData?.animation;
  }
Example #7
Source File: settings-layout.component.ts    From dating-client with MIT License 5 votes vote down vote up
prepareRoute(outlet: RouterOutlet): string {
    return outlet?.activatedRouteData?.animation ?? '*';
  }
Example #8
Source File: app.component.ts    From ng-ant-admin with MIT License 5 votes vote down vote up
prepareRoute(outlet: RouterOutlet) {
    return outlet?.activatedRouteData?.['key'];
  }
Example #9
Source File: default.component.ts    From ng-ant-admin with MIT License 5 votes vote down vote up
prepareRoute(outlet: RouterOutlet) {
    return outlet?.activatedRouteData?.['key'];
  }
Example #10
Source File: search-list.component.ts    From ng-ant-admin with MIT License 5 votes vote down vote up
prepareRoute(outlet: RouterOutlet) {
    return outlet?.activatedRouteData?.['key'];
  }
Example #11
Source File: app.component.ts    From mns with MIT License 5 votes vote down vote up
// Detect when a view changes
  prepareRoute(outlet: RouterOutlet) {
    return outlet && outlet.activatedRouteData && outlet.activatedRouteData.animation;
  }