layout-widjet.component.ts 1014 Bytes
Newer Older
Ooh-Ao committed
1
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
Ooh-Ao committed
2
import { ServicesComponent } from '../services/services.component';
Ooh-Ao committed
3
import { Service, WidjetService } from '../services/widjet.service';
Ooh-Ao committed
4
import { CommonModule } from '@angular/common';
Ooh-Ao committed
5
import { ActivatedRoute } from '@angular/router';
Ooh-Ao committed
6 7 8 9 10 11

@Component({
  selector: 'app-layout-widjet',
  standalone: true,
  imports: [CommonModule, ServicesComponent],
  templateUrl: './layout-widjet.component.html',
Ooh-Ao committed
12 13
  styleUrls: ['./layout-widjet.component.css'],
  encapsulation: ViewEncapsulation.None
Ooh-Ao committed
14 15
})
export class LayoutWidjetComponent implements OnInit {
Ooh-Ao committed
16
  appName = ""
Ooh-Ao committed
17 18
  widjetId = 0
  widgetList: Service[] = []
Ooh-Ao committed
19 20 21 22 23 24
  constructor(private widjetService: WidjetService, private readonly activatedRoute: ActivatedRoute) {
    this.activatedRoute.paramMap.subscribe(result => {
      this.appName = result.get('appName')!
      this.widgetList = this.widjetService.widjetConfig.filter(e => e.appName == this.appName)[0].widjet
    })

Ooh-Ao committed
25 26 27 28 29 30
  }

  ngOnInit() {
  }

}