mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-09 22:16:23 +00:00
Make whole frontend dynamically configurable to avoid rebuilds
This commit is contained in:
@ -1,18 +1,17 @@
|
||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { config } from '../config';
|
||||
import { DashboardConfigService } from '../services/config.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-sidebar',
|
||||
templateUrl: './sidebar.component.html',
|
||||
styleUrls: ['./sidebar.component.scss']
|
||||
})
|
||||
|
||||
export class SidebarComponent {
|
||||
@Input() layout: string;
|
||||
@Output() layoutChanged = new EventEmitter<string>();
|
||||
enabledLayouts: string[] = config.dashboard.enabledLayouts;
|
||||
enabledLayouts = this.configService.enabledLayouts;
|
||||
|
||||
constructor() {}
|
||||
constructor(private configService: DashboardConfigService) {}
|
||||
|
||||
setLayout(layout: string) {
|
||||
this.layout = layout;
|
||||
|
Reference in New Issue
Block a user