-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
85 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<!--The content below is only a placeholder and can be replaced.--> | ||
<div> | ||
<nav-menu></nav-menu> | ||
<h1> | ||
Welcome to {{ title }}! | ||
</h1> | ||
<app-value></app-value> | ||
</div> | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
22 changes: 22 additions & 0 deletions
22
Client/src/app/components/nav-menu/nav-menu.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<nav class="navbar navbar-expand-md navbar-dark bg-dark"> | ||
<a class="navbar-brand" href="#">Friendster</a> | ||
|
||
<ul class="navbar-nav mr-auto"> | ||
<li class="nav-item active"> | ||
<a class="nav-link" href="#">Friends</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#">Lists</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#">Messages</a> | ||
</li> | ||
</ul> | ||
|
||
<form #loginForm="ngForm" class="form-inline my-2 my-lg-0" (ngSubmit)="login()"> | ||
<input class="form-control mr-sm-2" type="text" name="username" placeholder="Username" required [(ngModel)]="model.username"> | ||
<input class="form-control mr-sm-2" type="password" name="password" placeholder="Password" required [(ngModel)]="model.password"> | ||
<button [disabled]="!loginForm.valid" class="btn btn-primary my-2 my-sm-0" type="submit">Login</button> | ||
</form> | ||
|
||
</nav> |
25 changes: 25 additions & 0 deletions
25
Client/src/app/components/nav-menu/nav-menu.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { NavMenuComponent } from './nav-menu.component'; | ||
|
||
describe('NavMenuComponent', () => { | ||
let component: NavMenuComponent; | ||
let fixture: ComponentFixture<NavMenuComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ NavMenuComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(NavMenuComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nav-menu', | ||
templateUrl: './nav-menu.component.html', | ||
styleUrls: ['./nav-menu.component.css'] | ||
}) | ||
export class NavMenuComponent implements OnInit { | ||
model: any = {}; | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
login() { | ||
console.log(this.model); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters