diff --git a/src/app/app.module.ts b/src/app/app.module.ts index e2ff3d2..3702bdf 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -25,6 +25,7 @@ import { MatIconModule } from '@angular/material/icon'; import { ContentResolver } from './ContentService/contentresolver.service'; import { NavigationComponent } from './navigation/navigation.component'; import { PasswordComponent } from './password/password.component'; +import { MatTooltipModule } from '@angular/material/tooltip'; // import {c} @NgModule({ @@ -44,6 +45,7 @@ import { PasswordComponent } from './password/password.component'; MatButtonModule, MatToolbarModule, MatIconModule, + MatTooltipModule, provideFirebaseApp(() => initializeApp({ projectId: environment.FIREBASE_PROJECT_ID, diff --git a/src/app/navigation/navigation.component.html b/src/app/navigation/navigation.component.html index 77d5aa2..5922656 100644 --- a/src/app/navigation/navigation.component.html +++ b/src/app/navigation/navigation.component.html @@ -1,11 +1,11 @@ - - NOTECODE + NotePage - - - \ No newline at end of file + + \ No newline at end of file diff --git a/src/app/navigation/navigation.component.ts b/src/app/navigation/navigation.component.ts index a84ddca..a44554e 100644 --- a/src/app/navigation/navigation.component.ts +++ b/src/app/navigation/navigation.component.ts @@ -1,10 +1,23 @@ import { Component } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; @Component({ selector: 'app-navigation', templateUrl: './navigation.component.html', - styleUrls: ['./navigation.component.css'] + styleUrls: ['./navigation.component.css'], }) export class NavigationComponent { + constructor(private router: Router, private route: ActivatedRoute) {} + sharePage() { + // OPen share menu of the browser when the share button is clicked + navigator + .share({ + title: 'Note Page', + text: 'Check out this note page', + url: window.location.href, + }) + .then(() => console.log('Successful share')) + .catch((error) => console.log('Error sharing', error)); + } }