File

app.component.ts

Description

Application to call disaggregation services and plot results.

Implements

OnInit

Metadata

Index

Properties
Methods

Constructor

constructor(service: AppService)
Parameters :
Name Type Optional
service AppService No

Methods

ngOnInit
ngOnInit()
Returns : void

Properties

navigationList
Default value : navigation()

Navigation list for menu

Public service
Type : AppService
title
Default value : apps().hazard.disagg.display

Application title

import {Component, OnInit} from '@angular/core';
import {NshmpLibNgAboutPageComponent} from '@ghsc/nshmp-lib-ng/about';
import {NshmpLibNgHazardProvisionalModelComponent} from '@ghsc/nshmp-lib-ng/hazard';
import {NshmpLibNgTemplateComponent} from '@ghsc/nshmp-lib-ng/nshmp';
import {
  NshmpTemplateContentContainerComponent,
  NshmpTemplateControlPanelComponent,
  NshmpTemplateMainContentComponent,
} from '@ghsc/nshmp-template';
import {apps} from 'projects/nshmp-apps/src/shared/utils/applications.utils';
import {navigation} from 'projects/nshmp-apps/src/shared/utils/navigation.utils';

import {AboutComponent} from './components/about/about.component';
import {ContentComponent} from './components/content/content.component';
import {ControlPanelComponent} from './components/control-panel/control-panel.component';
import {AppService} from './services/app.service';

/**
 * Application to call disaggregation services and plot results.
 */
@Component({
  imports: [
    NshmpLibNgTemplateComponent,
    NshmpTemplateControlPanelComponent,
    NshmpTemplateContentContainerComponent,
    NshmpTemplateMainContentComponent,
    NshmpLibNgAboutPageComponent,
    NshmpLibNgHazardProvisionalModelComponent,
    ControlPanelComponent,
    ContentComponent,
    AboutComponent,
  ],
  selector: 'app-app',
  styleUrl: './app.component.scss',
  templateUrl: './app.component.html',
})
export class AppComponent implements OnInit {
  /** Navigation list for menu */
  navigationList = navigation();
  /** Application title */
  title = apps().hazard.disagg.display;

  constructor(public service: AppService) {}

  ngOnInit(): void {
    this.service.init();
  }
}
<nshmp-lib-ng-template [navigationList]="navigationList" [title]="title">
  <nshmp-template-content-container [showSettingsPanel]="false">
    <nshmp-template-control-panel>
      <app-control-panel />
    </nshmp-template-control-panel>

    <nshmp-template-main-content>
      <app-content />
    </nshmp-template-main-content>
  </nshmp-template-content-container>

  <!-- Provisional model warning -->
  <nshmp-lib-ng-hazard-provisional-model
    [name]="service.usage()?.response?.model?.name"
  />

  <!-- About page -->
  <nshmp-lib-ng-about-page>
    <app-about />
  </nshmp-lib-ng-about-page>
</nshmp-lib-ng-template>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""