app.component.ts
Main entrypoint for magnitude frequency distrinbution (MFD) application.
Plots magnitude vs. rate and logic tree.
OnInit
selector | app-app |
imports |
NshmpLibNgTemplateComponent
NshmpTemplateContentContainerComponent
NshmpTemplateControlPanelComponent
NshmpTemplateMainContentComponent
NshmpTemplateSettingsComponent
NshmpLibNgHazardProvisionalModelComponent
NshmpLibNgAboutPageComponent
ControlPanelComponent
ContentComponent
PlotSettingsPanelComponent
AboutComponent
|
templateUrl | ./app.component.html |
styleUrl | ./app.component.scss |
Properties |
|
Methods |
constructor(nshmpTemplateService: NshmpTemplateService, service: AppService)
|
|||||||||
Defined in app.component.ts:49
|
|||||||||
Parameters :
|
ngOnInit |
ngOnInit()
|
Defined in app.component.ts:56
|
Returns :
void
|
navigationList |
Default value : navigation()
|
Defined in app.component.ts:47
|
Navigation list for menu |
Public nshmpTemplateService |
Type : NshmpTemplateService
|
Defined in app.component.ts:52
|
Public service |
Type : AppService
|
Defined in app.component.ts:53
|
title |
Default value : apps().source.mfd.display
|
Defined in app.component.ts:49
|
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,
NshmpTemplateService,
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 magnitude frequency distrinbution (MFD)
* application.
*
* Plots magnitude vs. rate and logic tree.
*/
@Component({
imports: [
NshmpLibNgTemplateComponent,
NshmpTemplateContentContainerComponent,
NshmpTemplateControlPanelComponent,
NshmpTemplateMainContentComponent,
NshmpTemplateSettingsComponent,
NshmpLibNgHazardProvisionalModelComponent,
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().source.mfd.display;
constructor(
public nshmpTemplateService: NshmpTemplateService,
public service: AppService,
) {}
ngOnInit(): void {
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>
<!-- 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>