app.component.ts
Application to call disaggregation services and plot results.
OnInit
selector | app-app |
imports |
NshmpLibNgTemplateComponent
NshmpTemplateControlPanelComponent
NshmpTemplateContentContainerComponent
NshmpTemplateMainContentComponent
NshmpLibNgAboutPageComponent
NshmpLibNgHazardProvisionalModelComponent
ControlPanelComponent
ContentComponent
AboutComponent
|
templateUrl | ./app.component.html |
styleUrl | ./app.component.scss |
Properties |
|
Methods |
constructor(service: AppService)
|
||||||
Defined in app.component.ts:41
|
||||||
Parameters :
|
ngOnInit |
ngOnInit()
|
Defined in app.component.ts:45
|
Returns :
void
|
navigationList |
Default value : navigation()
|
Defined in app.component.ts:39
|
Navigation list for menu |
Public service |
Type : AppService
|
Defined in app.component.ts:43
|
title |
Default value : apps().hazard.disagg.display
|
Defined in app.component.ts:41
|
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>