import { Component , OnInit } from "@angular/core" ; import { ActivatedRoute } from "@angular/router" ; import { DynamicComponentConfig } from "../../view/dynamic-components/dynamic-component-config.interface" ; import { RouteData } from "../../view/dynamic-routing/view-config.interface" ; @ Component ( { selector : "app-dashboard" , templateUrl : "./dashboard.component.html" , styleUrls : [ "./dashboard.component.scss" ] , } ) export class DashboardComponent implements OnInit { widgets : DynamicComponentConfig [ ] = [ ] ; constructor ( private activatedRoute ) { } ngOnInit ( ) { this . activatedRoute . data . subscribe ( ( data ) => { this . widgets = data . config . widgets ; } ) ; } }