Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <nav id="topnav">
- <div class="container">
- <a routerLinkActive="active" tabindex="1" class="skip-link" href="#skipContent">Skip to content</a>
- <a routerLinkActive="active" tabindex="2" routerLink="/page1a">Page1-a</a>
- <a routerLinkActive="active" tabindex="2" routerLink="/page1b">Page1-b</a>
- <a routerLinkActive="active" tabindex="2" routerLink="/page1c">Page1-c</a>
- </div>
- <nav>
- import { Component, OnInit } from '@angular/core';
- @Component({
- selector: 'app-topNav',
- templateUrl: './topNav.component.html',
- styleUrls: ['./topNav.component.scss']
- })
- export class topNavComponent implements OnInit {
- constructor() { }
- ngOnInit() {
- }
- }
- <nav id="main-navigation">
- <div *ngIf="section == 'home'; else homeInactive">
- <a id="Home" routerLinkActive="inactive"
- routerLink="/page1a">
- </a>
- </div>
- <ng-template #homeInactive>
- <a id="Home"
- routerLinkActive="active" routerLink="/page1a">
- </a>
- </ng-template>
- <a id="leftTab2" routerLinkActive="inactive"
- routerLink="/leftTab2">
- </a>
- <a id="leftTab3" routerLinkActive="inactive" routerLink="/leftTab3">
- </a>
- </nav>
- @Component({
- selector: 'app-leftNav',
- templateUrl: './leftNav.component.html',
- styleUrls: ['./leftNav.component.scss']
- })
- export class leftNavComponent implements OnInit {
- @Input() section: string;
- constructor() { }
- ngOnInit() {
- }
- }
Add Comment
Please, Sign In to add comment