-
Notifications
You must be signed in to change notification settings - Fork 3
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
17 changed files
with
232 additions
and
71 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary mb-1"> | ||
<a class="navbar-brand py-0 px-3" href="#" style=""><img height="50px" src="assets/img/logo-ngrx.png"/></a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" | ||
aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<div class="collapse navbar-collapse" id="navbarsExampleDefault"> | ||
<ul class="navbar-nav mr-auto"> | ||
<li class="nav-item active"> | ||
<a class="nav-link" href="#">NgRx Data / SpringBoot</a> | ||
</li> | ||
|
||
</ul> | ||
<div class="float-right pr-3"> | ||
<span class="navbar-text text-white"> | ||
|
||
<span class="badge badge-secondary"> | ||
<span>Alain Boudard</span> | ||
</span> | ||
<span class="small"> | <a href="#">Déconnexion</a></span> | ||
</span> | ||
</div> | ||
</div> | ||
</nav> |
Empty file.
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 { NavbarComponent } from './navbar.component'; | ||
|
||
describe('NavbarComponent', () => { | ||
let component: NavbarComponent; | ||
let fixture: ComponentFixture<NavbarComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ NavbarComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(NavbarComponent); | ||
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,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-navbar', | ||
templateUrl: './navbar.component.html', | ||
styleUrls: ['./navbar.component.scss'] | ||
}) | ||
export class NavbarComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
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,5 +1,6 @@ | ||
export interface Todo { | ||
id?: number; | ||
title: string; | ||
description: string; | ||
active: boolean; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { TodosComponent } from './todos/todos.component'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule | ||
], | ||
declarations: [TodosComponent], | ||
exports: [TodosComponent] | ||
}) | ||
export class TodoModule { } |
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,35 @@ | ||
<table class="table table-hover table-bordered"> | ||
<thead class="thead-light"> | ||
<tr> | ||
<th scope="col">#</th> | ||
<th scope="col">Title</th> | ||
<th scope="col">Description</th> | ||
<th> </th> | ||
</tr> | ||
<tr> | ||
<th></th> | ||
<th> | ||
<div class="input-group input-group-sm"> | ||
<input class="form-control" type="text"> | ||
</div> | ||
</th> | ||
<th></th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr *ngFor="let todo of todos$ | async; let i = index"> | ||
<th scope="row"><span [innerText]="todo.id"></span></th> | ||
<td><span [innerText]="todo.title"></span></td> | ||
<td><span [innerText]="todo.description"></span></td> | ||
<td> | ||
|
||
<i class="fas fa-trash float-right text-danger" (click)="deleteTodo(todo.id)"></i> | ||
<span *ngIf="todo.active"><i class="float-right far fa-check-square fa-lg text-info mr-2" (click)="updateTodo(todo)"></i></span> | ||
<span *ngIf="!todo.active"><i class="float-right far fa-square fa-lg text-secondary mr-2" (click)="updateTodo(todo)"></i></span> | ||
|
||
</td> | ||
</tr> | ||
|
||
</tbody> | ||
</table> |
Empty file.
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 { TodosComponent } from './todos.component'; | ||
|
||
describe('TodosComponent', () => { | ||
let component: TodosComponent; | ||
let fixture: ComponentFixture<TodosComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ TodosComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(TodosComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.