Oviya commited on
Commit
c2b277a
·
1 Parent(s): e20fbf3

add function

Browse files
src/app/home/home.component.html CHANGED
@@ -31,7 +31,11 @@
31
  <i class="fas fa-caret-down"></i>
32
  </a>
33
  <ul class="submenu">
34
- <li><a routerLink="/pronunciation-improvement" routerLinkActive="active-link">Pronunciation Improvement</a></li>
 
 
 
 
35
  <li><a routerLink="/personality-improvement" routerLinkActive="active-link">Personality Improvement</a></li>
36
  <li><a routerLink="/body-language-improvement" routerLinkActive="active-link">Body Language Improvement</a></li>
37
  </ul>
 
31
  <i class="fas fa-caret-down"></i>
32
  </a>
33
  <ul class="submenu">
34
+ <li>
35
+ <a href="#" (click)="openPronunciation(); $event.preventDefault()" role="button" aria-pressed="false">
36
+ Pronunciation Trainer
37
+ </a>
38
+ </li>
39
  <li><a routerLink="/personality-improvement" routerLinkActive="active-link">Personality Improvement</a></li>
40
  <li><a routerLink="/body-language-improvement" routerLinkActive="active-link">Body Language Improvement</a></li>
41
  </ul>
src/app/home/home.component.ts CHANGED
@@ -3,6 +3,8 @@ import { Router } from '@angular/router';
3
  import { AuthService } from '../auth/auth.service';
4
  import { Subscription } from 'rxjs';
5
  import { BrandService } from '../shared/brand.service';
 
 
6
 
7
  @Component({
8
  selector: 'app-home',
@@ -41,7 +43,8 @@ export class HomeComponent implements AfterViewInit, OnInit, OnDestroy {
41
  private router: Router,
42
  private authService: AuthService,
43
  private host: ElementRef,
44
- public brand: BrandService
 
45
  ) { }
46
 
47
  // -------------------- Lifecycle Hooks --------------------
@@ -158,4 +161,13 @@ export class HomeComponent implements AfterViewInit, OnInit, OnDestroy {
158
  closeTermsPopup(): void {
159
  this.showTermsPopup = false;
160
  }
 
 
 
 
 
 
 
 
 
161
  }
 
3
  import { AuthService } from '../auth/auth.service';
4
  import { Subscription } from 'rxjs';
5
  import { BrandService } from '../shared/brand.service';
6
+ import { MatDialog } from '@angular/material/dialog';
7
+ import { PronunciationComponent } from '../pronunciation/pronunciation.component';
8
 
9
  @Component({
10
  selector: 'app-home',
 
43
  private router: Router,
44
  private authService: AuthService,
45
  private host: ElementRef,
46
+ public brand: BrandService,
47
+ private dialog: MatDialog
48
  ) { }
49
 
50
  // -------------------- Lifecycle Hooks --------------------
 
161
  closeTermsPopup(): void {
162
  this.showTermsPopup = false;
163
  }
164
+
165
+ openPronunciation(): void {
166
+ const dialogRef = this.dialog.open(PronunciationComponent, {
167
+ width: '90vw',
168
+ maxWidth: '95vw',
169
+ height: '85vh',
170
+ disableClose: true
171
+ });
172
+ }
173
  }