Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { NgModule } from '@angular/core';
- import { CommonModule } from '@angular/common';
- import { WellsComponent } from './wells.component';
- import { SharedModule } from 'src/app/shared/shared.module';
- export const WELL_ROUTES: Routes = [
- { data : { label: 'Overview' }, path: '', component: OverviewComponent },
- { data : { label: 'Status' }, path: ':wellId/status', component: StatusComponent },
- { data : { label: 'Alarm Settings' }, path: ':wellId/alarm-settings', component: AlarmSettingsComponent },
- { data : { label: 'Down Hole Gauge' }, path: ':wellId/down-hole-gauge', component: DownHoleGaugeComponent },
- { data : { label: 'Gas Injection' }, path: ':wellId/gas-injection', component: GasInjectionComponent },
- { data : { label: 'Pressure Overrides' }, path: ':wellId/pressure-overrides', component: PressureOverridesComponent },
- { data : { label: 'Location' }, path: ':wellId/location', component: LocationComponent }
- ];
- @NgModule({
- imports: [
- SharedModule
- ],
- declarations: [
- WellsComponent
- ],
- exports: [
- WellsComponent
- ]
- })
- export class WellsModule {}
- import { Component, OnInit, Input } from '@angular/core';
- import { WELL_ROUTES } from './wells.module';
- @Component({
- selector: 'app-wells',
- templateUrl: './wells.component.html',
- styleUrls: ['./wells.component.scss']
- })
- export class WellsComponent implements OnInit {
- @Input() navLinks: any[] = [];
- constructor() {
- const navLinks: any[] = [];
- WELL_ROUTES.forEach((item, idx) => {
- if (item.path) {
- const label: string = item.data.label;
- const link: string = item.path;
- navLinks.push({ label: label, link: link });
- }
- });
- this.navLinks = navLinks;
- }
- ngOnInit() {}
- }
- Error:
- Unexpected value 'undefined' exported by the module 'WellsModule'
Add Comment
Please, Sign In to add comment