Guest User

Untitled

a guest
Jun 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. <nav id="topnav">
  2. <div class="container">
  3. <a routerLinkActive="active" tabindex="1" class="skip-link" href="#skipContent">Skip to content</a>
  4. <a routerLinkActive="active" tabindex="2" routerLink="/page1a">Page1-a</a>
  5. <a routerLinkActive="active" tabindex="2" routerLink="/page1b">Page1-b</a>
  6. <a routerLinkActive="active" tabindex="2" routerLink="/page1c">Page1-c</a>
  7. </div>
  8. <nav>
  9.  
  10. import { Component, OnInit } from '@angular/core';
  11. @Component({
  12. selector: 'app-topNav',
  13. templateUrl: './topNav.component.html',
  14. styleUrls: ['./topNav.component.scss']
  15. })
  16. export class topNavComponent implements OnInit {
  17.  
  18. constructor() { }
  19.  
  20. ngOnInit() {
  21. }
  22.  
  23. }
  24.  
  25. <nav id="main-navigation">
  26.  
  27. <div *ngIf="section == 'home'; else homeInactive">
  28. <a id="Home" routerLinkActive="inactive"
  29. routerLink="/page1a">
  30. </a>
  31. </div>
  32.  
  33. <ng-template #homeInactive>
  34. <a id="Home"
  35. routerLinkActive="active" routerLink="/page1a">
  36. </a>
  37. </ng-template>
  38.  
  39. <a id="leftTab2" routerLinkActive="inactive"
  40. routerLink="/leftTab2">
  41. </a>
  42.  
  43. <a id="leftTab3" routerLinkActive="inactive" routerLink="/leftTab3">
  44. </a>
  45. </nav>
  46.  
  47. @Component({
  48. selector: 'app-leftNav',
  49. templateUrl: './leftNav.component.html',
  50. styleUrls: ['./leftNav.component.scss']
  51. })
  52. export class leftNavComponent implements OnInit {
  53.  
  54. @Input() section: string;
  55. constructor() { }
  56.  
  57. ngOnInit() {
  58. }
  59.  
  60. }
Add Comment
Please, Sign In to add comment