File

app.component.ts

Description

Main entrypoint for ground motion vs distance application.

Plots GM vs distance using GMM service.

See https://earthquake.usgs.gov/ws/nshmp/data/gmm/distance

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().gmm.distance.display

Application title

import {Component, OnInit} from '@angular/core';
import {NshmpLibNgAboutPageComponent} from '@ghsc/nshmp-lib-ng/about';
import {NshmpLibNgTemplateComponent} from '@ghsc/nshmp-lib-ng/nshmp';
import {
  NshmpTemplateContentContainerComponent,
  NshmpTemplateControlPanelComponent,
  NshmpTemplateMainContentComponent,
  NshmpTemplateSettingsComponent,
} 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 {PlotSettingsPanelComponent} from './components/plot-settings-panel/plot-settings-panel.component';
import {AppService} from './services/app.service';

/**
 * Main entrypoint for ground motion vs distance application.
 *
 * Plots GM vs distance using GMM service.
 *
 * @see https://earthquake.usgs.gov/ws/nshmp/data/gmm/distance
 */
@Component({
  imports: [
    NshmpLibNgTemplateComponent,
    NshmpTemplateContentContainerComponent,
    NshmpTemplateControlPanelComponent,
    NshmpTemplateMainContentComponent,
    NshmpTemplateSettingsComponent,
    NshmpLibNgAboutPageComponent,
    ControlPanelComponent,
    ContentComponent,
    PlotSettingsPanelComponent,
    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().gmm.distance.display;

  constructor(public service: AppService) {}

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

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

    <nshmp-template-settings>
      <app-plot-settings-panel />
    </nshmp-template-settings>
  </nshmp-template-content-container>

  <!-- 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 ""