Skip to content

Commit 04ac0a5

Browse files
author
bcsik
committed
add styling
1 parent 909e45a commit 04ac0a5

File tree

6 files changed

+40
-2
lines changed

6 files changed

+40
-2
lines changed

package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@angular/platform-browser": "^17.2.0",
2020
"@angular/platform-browser-dynamic": "^17.2.0",
2121
"@angular/router": "^17.2.0",
22+
"primeng": "^17.7.0",
2223
"rxjs": "~7.8.0",
2324
"tslib": "^2.3.0",
2425
"zone.js": "~0.14.3"
@@ -44,4 +45,4 @@
4445
"karma-jasmine-html-reporter": "~2.1.0",
4546
"typescript": "~5.3.2"
4647
}
47-
}
48+
}

src/app/app.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
<p-menubar [model]="model"></p-menubar>
12
<router-outlet />

src/app/app.component.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
11
import { Component } from '@angular/core';
22
import { RouterOutlet } from '@angular/router';
3+
import {MenuItem} from "primeng/api";
4+
import {MenubarModule} from "primeng/menubar";
35

46
@Component({
57
selector: 'app-root',
68
standalone: true,
7-
imports: [RouterOutlet],
9+
imports: [RouterOutlet, MenubarModule],
810
templateUrl: './app.component.html',
911
styleUrl: './app.component.css'
1012
})
1113
export class AppComponent {
14+
protected readonly model: MenuItem[] = [
15+
{
16+
label: 'Video',
17+
routerLink: 'video'
18+
},
19+
{
20+
label: 'Event',
21+
routerLink: 'event'
22+
},
23+
{
24+
label: 'Member',
25+
routerLink: 'member'
26+
}
27+
]
1228
}

src/app/app.routes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export const routes: Routes = [
66
children: [
77
{
88
path: '',
9+
loadComponent: () => import('./features/home/home.component').then(c => c.HomeComponent)
910
},
1011
{
1112
path: 'video',

src/styles.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
/* You can add global styles to this file, and also import other style files */
2+
3+
@import "primeng/resources/themes/viva-dark/theme.css";
4+
@import "primeng/resources/primeng.min.css";

0 commit comments

Comments
 (0)