import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ExceptionType } from '@delon/abc/exception'; @Component({ selector: 'app-exception', template: ` `, changeDetection: ChangeDetectionStrategy.OnPush }) export class ExceptionComponent { get type(): ExceptionType { return this.route.snapshot.data.type; } constructor(private route: ActivatedRoute) {} }