diff --git a/.gitignore b/.gitignore
index 70583d7..7a753b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,7 @@ yarn-error.log
/libpeerconnection.log
testem.log
/typings
+/environments
# System files
.DS_Store
diff --git a/src/app/app.html b/src/app/app.html
index c7ae0dc..24ff786 100644
--- a/src/app/app.html
+++ b/src/app/app.html
@@ -1,5 +1,7 @@
-
+
+
+
+
-
\ No newline at end of file
diff --git a/src/app/pages/home/home.html b/src/app/pages/home/home.html
index 6e1756e..ff55278 100644
--- a/src/app/pages/home/home.html
+++ b/src/app/pages/home/home.html
@@ -1 +1 @@
-
home works!
+
\ No newline at end of file
diff --git a/src/app/pages/home/home.ts b/src/app/pages/home/home.ts
index bd403ec..9a7d89d 100644
--- a/src/app/pages/home/home.ts
+++ b/src/app/pages/home/home.ts
@@ -1,8 +1,9 @@
import { Component } from '@angular/core';
+import { Search } from "../search/search";
@Component({
selector: 'app-home',
- imports: [],
+ imports: [Search],
templateUrl: './home.html',
styleUrl: './home.css'
})
diff --git a/src/app/pages/potd/potd.html b/src/app/pages/potd/potd.html
index 831123d..c349967 100644
--- a/src/app/pages/potd/potd.html
+++ b/src/app/pages/potd/potd.html
@@ -3,15 +3,14 @@
{{nasaPOTD()?.title}}
-
Copyright: {{nasaPOTD()?.copyright}}
+
{{nasaPOTD()?.copyright}}
{{nasaPOTD()?.explanation}}
-
-
diff --git a/src/app/shared/header/header.html b/src/app/shared/header/header.html
index 2f7ad64..e69de29 100644
--- a/src/app/shared/header/header.html
+++ b/src/app/shared/header/header.html
@@ -1,12 +0,0 @@
-
-
-
-
- @if(isLoggedIn()){
-
- }
- @if(!isLoggedIn()){
-
-
- }
-
\ No newline at end of file
diff --git a/src/app/shared/sidebar/sidebar.html b/src/app/shared/sidebar/sidebar.html
index c59e43b..181c0f7 100644
--- a/src/app/shared/sidebar/sidebar.html
+++ b/src/app/shared/sidebar/sidebar.html
@@ -1 +1,12 @@
-sidebar works!
+
+
+
+
+ @if(isLoggedIn()){
+
+ }
+ @if(!isLoggedIn()){
+
+
+ }
+
diff --git a/src/app/shared/sidebar/sidebar.ts b/src/app/shared/sidebar/sidebar.ts
index f156eac..066d597 100644
--- a/src/app/shared/sidebar/sidebar.ts
+++ b/src/app/shared/sidebar/sidebar.ts
@@ -1,4 +1,6 @@
-import { Component } from '@angular/core';
+import { Component, computed, input, signal, Signal } from '@angular/core';
+import { Router, RouterLink } from '@angular/router';
+import { Auth } from '../../services/auth';
@Component({
selector: 'app-sidebar',
@@ -7,5 +9,17 @@ import { Component } from '@angular/core';
styleUrl: './sidebar.css'
})
export class Sidebar {
+ userEmail=input(null);
+ isLoggedIn = computed(()=>this.userEmail() !== null)
+ currentUserEmail = computed(()=> this.userEmail());
+
+ constructor(private readonly loginservice: Auth, private readonly router: Router){
+
+ }
+
+ logout(){
+ this.loginservice.logout();
+ this.router.navigate(["/login"])
+ }
}
diff --git a/src/index.html b/src/index.html
index 65fd1d1..3192fd2 100644
--- a/src/index.html
+++ b/src/index.html
@@ -2,7 +2,7 @@
- TpAngularFinal
+ Nasa youtube clone
diff --git a/tsconfig.app.json b/tsconfig.app.json
index 254a59d..0bd7321 100644
--- a/tsconfig.app.json
+++ b/tsconfig.app.json
@@ -3,6 +3,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
+ "rootDir": "./src",
"outDir": "./out-tsc/app",
"types": []
},
diff --git a/tsconfig.spec.json b/tsconfig.spec.json
index f936da6..60636fe 100644
--- a/tsconfig.spec.json
+++ b/tsconfig.spec.json
@@ -3,6 +3,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
+ "rootDir": "./src",
"outDir": "./out-tsc/spec",
"types": [
"jasmine"