Quellcode durchsuchen

fix: pc health tabs & routes

未来全栈 vor 3 Tagen
Ursprung
Commit
895558c09d

+ 2 - 2
industry-monitor-web/src/modules/monitor/health/health.routes.ts

@@ -3,10 +3,10 @@ import { Routes } from '@angular/router';
 export const routes: Routes = [
   {
     path: "dashboard",
-    loadChildren:()=>import("./page-dashboard/page-dashboard").then(m=>m.PageDashboard)
+    loadComponent:()=>import("./page-dashboard/page-dashboard").then(m=>m.PageDashboard)
   },
   {
     path: "monitor",
-    loadChildren:()=>import("./page-monitor/page-monitor").then(m=>m.PageMonitor)
+    loadComponent:()=>import("./page-monitor/page-monitor").then(m=>m.PageMonitor)
   }
 ];

+ 3 - 3
industry-monitor-web/src/modules/monitor/health/nav-pc-health-tabs/nav-pc-health-tabs.html

@@ -1,3 +1,3 @@
-<button @RouterLink="/monitor/health/dashboard">仪表盘</button>
-<button @RouterLink="/monitor/health/detection">检测</button>
-<p>nav-pc-health-tabs works!</p>
+<button [routerLink]="'/monitor/health/dashboard'">仪表盘</button>
+<button [routerLink]="'/monitor/health/detection'">检测</button>
+<p>nav-pc-health-tabs works!</p>

+ 4 - 5
industry-monitor-web/src/modules/monitor/health/nav-pc-health-tabs/nav-pc-health-tabs.ts

@@ -1,13 +1,12 @@
 import { Component } from '@angular/core';
-import { RouterModule, RouterOutlet } from '@angular/router';
+import { RouterModule } from '@angular/router';
 
 @Component({
   selector: 'app-nav-pc-health-tabs',
-  imports: [RouterOutlet,RouterModule],
+  standalone: true,
+  imports: [RouterModule],
   templateUrl: './nav-pc-health-tabs.html',
   styleUrl: './nav-pc-health-tabs.scss'
 })
 export class NavPcHealthTabs {
-
-
-}
+}

+ 1 - 0
industry-monitor-web/src/modules/monitor/health/page-dashboard/page-dashboard.ts

@@ -3,6 +3,7 @@ import { Component } from '@angular/core';
 @Component({
   selector: 'app-page-dashboard',
   imports: [],
+  standalone:true,
   templateUrl: './page-dashboard.html',
   styleUrl: './page-dashboard.scss'
 })

+ 1 - 0
industry-monitor-web/src/modules/monitor/health/page-monitor/page-monitor.ts

@@ -3,6 +3,7 @@ import { Component } from '@angular/core';
 @Component({
   selector: 'app-page-monitor',
   imports: [],
+  standalone:true,
   templateUrl: './page-monitor.html',
   styleUrl: './page-monitor.scss'
 })