Skip to content

Commit d95fbda

Browse files
committed
updated the navbar component content
1 parent f42b2a5 commit d95fbda

File tree

6 files changed

+56
-2
lines changed

6 files changed

+56
-2
lines changed
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1-
<p>masterpage works!</p>
1+
<header>
2+
<nav>
3+
<app-navbar></app-navbar>
4+
</nav>
5+
<section class="carousel-container">
6+
carousel goes here...
7+
</section>
8+
</header>
9+
<main>
10+
11+
</main>
12+
<footer>
13+
Footer goes here...
14+
</footer>
15+
<router-outlet/>

src/app/layout/masterpage/masterpage.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { Component } from '@angular/core';
2+
import { NavbarComponent } from "../navbar/navbar.component";
3+
import { RouterOutlet } from '@angular/router';
24

35
@Component({
46
selector: 'app-masterpage',
5-
imports: [],
7+
imports: [NavbarComponent, RouterOutlet],
68
templateUrl: './masterpage.component.html',
79
styleUrl: './masterpage.component.scss'
810
})
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<a routerLink="/">Home</a> |
2+
<a routerLink="/about-us">About Us</a>
3+
<router-outlet/>

src/app/layout/navbar/navbar.component.scss

Whitespace-only changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { NavbarComponent } from './navbar.component';
4+
5+
describe('NavbarComponent', () => {
6+
let component: NavbarComponent;
7+
let fixture: ComponentFixture<NavbarComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
imports: [NavbarComponent]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(NavbarComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
import { RouterLink, RouterOutlet } from '@angular/router';
3+
4+
@Component({
5+
selector: 'app-navbar',
6+
imports: [RouterLink, RouterOutlet ],
7+
templateUrl: './navbar.component.html',
8+
styleUrl: './navbar.component.scss'
9+
})
10+
export class NavbarComponent {
11+
12+
}

0 commit comments

Comments
 (0)