mirror of https://github.com/abpframework/abp.git
3 changed files with 33 additions and 7 deletions
@ -0,0 +1,18 @@ |
|||||
|
import { Type, Component, OnInit } from '@angular/core'; |
||||
|
import { Router, ActivatedRoute } from '@angular/router'; |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'identity-route-wrapper', |
||||
|
template: ` |
||||
|
<ng-container *ngComponentOutlet="defaultComponent"></ng-container> |
||||
|
`,
|
||||
|
}) |
||||
|
export class RouteWrapperComponent implements OnInit { |
||||
|
defaultComponent: Type<any>; |
||||
|
|
||||
|
constructor(private route: ActivatedRoute) {} |
||||
|
|
||||
|
ngOnInit() { |
||||
|
this.defaultComponent = this.route.snapshot.data.component.default; |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue