Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 6c32ed0

Browse files
committed
notifications demo
1 parent c479f18 commit 6c32ed0

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"scripts": {
55
"ng": "ng",
66
"start": "node server.js",
7-
"dev": "ng s --project micro-frontends-angular-app --disable-host-check --port 4200 --deploy-url http://localhost:4200/ --live-reload false",
8-
"dev-https": "ng s --ssl --project micro-frontends-angular-app --disable-host-check --port 4200 --deploy-url http://localhost:4200/ --live-reload false",
9-
"build-local": "ng build micro-frontends-angular-app --prod --deploy-url http://localhost:4200/",
7+
"dev": "ng s --project micro-frontends-angular-app --disable-host-check --port 4200 --host 0.0.0.0 --serve-path /angular/ --deploy-url http://localhost:4200/angular/ --live-reload false",
8+
"dev-https": "ng s --ssl --project micro-frontends-angular-app --disable-host-check --port 4200 --host 0.0.0.0 --serve-path /angular/ --deploy-url http://localhost:4200/angular/ --live-reload false",
9+
"build-local": "ng build micro-frontends-angular-app --prod --deploy-url http://localhost:4200/angular/",
1010
"build": "ng build micro-frontends-angular-app --prod",
1111
"test": "ng test",
1212
"lint": "ng lint",

src/app/app.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, OnInit } from '@angular/core';
2-
import { setAppMenu } from '@topcoder/micro-frontends-navbar-app';
2+
import { setAppMenu, setNotificationPlatform, PLATFORM } from '@topcoder/micro-frontends-navbar-app';
33
import appMenu from './constants/appMenu';
44

55
@Component({
@@ -13,5 +13,6 @@ export class AppComponent implements OnInit {
1313
ngOnInit(): void {
1414
// when app starts it should set its side menu structure
1515
setAppMenu('/micro-frontends-angular-route', appMenu);
16+
setNotificationPlatform(PLATFORM.COMMUNITY);
1617
}
1718
}

src/app/constants/appMenu.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ const appMenu = [
2525
icon: homeIcon,
2626
activeIcon: homeActiveIcon,
2727
},
28+
{
29+
title: 'View All Notifications',
30+
path: '/notifications',
31+
icon: homeIcon,
32+
activeIcon: homeActiveIcon,
33+
},
2834
];
2935

3036
export default appMenu;

src/typings.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ declare module '@topcoder/micro-frontends-navbar-app' {
66
export const getAuthUserProfile: any;
77
export const disableSidebarForRoute: any;
88
export const enableSidebarForRoute: any;
9+
export const setNotificationPlatform: (platform: string) => void;
10+
export const PLATFORM: { [key: string]: string };
911
}
1012

1113
declare module "*.svg" {

0 commit comments

Comments
 (0)