Skip to content
Snippets Groups Projects
Commit b36d2bf4 authored by Hugo BAYOUD's avatar Hugo BAYOUD
Browse files

generate drinks component and routerLink to /drinks from /bars

parent 81831ee8
No related branches found
No related tags found
1 merge request!3Resolve "[FRONT] Créer le composant drinks et la card pour une maquette"
...@@ -24,9 +24,10 @@ import { environment } from 'src/environments/environment'; ...@@ -24,9 +24,10 @@ import { environment } from 'src/environments/environment';
import { reducersMap } from './share/store'; import { reducersMap } from './share/store';
import { AuthEffects } from './share/store/effects/auth.effects'; import { AuthEffects } from './share/store/effects/auth.effects';
import { BarEffects } from './share/store/effects/bar.effects'; import { BarEffects } from './share/store/effects/bar.effects';
import { DrinksComponent } from './components/drinks/drinks.component';
@NgModule({ @NgModule({
declarations: [AppComponent], declarations: [AppComponent, DrinksComponent],
imports: [ imports: [
BrowserModule, BrowserModule,
BrowserAnimationsModule, BrowserAnimationsModule,
......
import { Route } from "@angular/router"; import { Route } from "@angular/router";
import { BarsComponent } from "./components/bars/bars.component"; import { BarsComponent } from "./components/bars/bars.component";
import { DrinksComponent } from "./components/drinks/drinks.component";
import { SigninComponent } from "./components/signin/signin.component"; import { SigninComponent } from "./components/signin/signin.component";
import { SignupComponent } from "./components/signup/signup.component"; import { SignupComponent } from "./components/signup/signup.component";
import { WelcomeComponent } from "./components/welcome/welcome.component"; import { WelcomeComponent } from "./components/welcome/welcome.component";
...@@ -11,6 +12,7 @@ export const APP_ROUTING: Route[] = [ ...@@ -11,6 +12,7 @@ export const APP_ROUTING: Route[] = [
{ path: 'photos', canActivate: [AuthGuard], loadChildren: () => import('./photos/photos.module').then(m => m.PhotosModule) }, { path: 'photos', canActivate: [AuthGuard], loadChildren: () => import('./photos/photos.module').then(m => m.PhotosModule) },
{ path: 'profile', canActivate: [AuthGuard], loadChildren: () => import('./profile/profile.module').then(m => m.ProfileModule) }, { path: 'profile', canActivate: [AuthGuard], loadChildren: () => import('./profile/profile.module').then(m => m.ProfileModule) },
{ path: 'bars', canActivate: [AuthGuard], component: BarsComponent }, { path: 'bars', canActivate: [AuthGuard], component: BarsComponent },
{ path: 'drinks', canActivate: [AuthGuard], component: DrinksComponent },
{ path: 'signup', canActivate: [AlreadyLoggedInGuard], component: SignupComponent }, { path: 'signup', canActivate: [AlreadyLoggedInGuard], component: SignupComponent },
{ path: 'signin', canActivate: [AlreadyLoggedInGuard], component: SigninComponent }, { path: 'signin', canActivate: [AlreadyLoggedInGuard], component: SigninComponent },
{ path: '', redirectTo: '', pathMatch: 'full' }, { path: '', redirectTo: '', pathMatch: 'full' },
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div>{{ bar.address }}</div> <div>{{ bar.address }}</div>
</div> </div>
<div class="card-action"> <div class="card-action">
<button mat-raised-button color='accent'>choisir</button> <button mat-raised-button routerLink="/drinks" color='accent'>choisir</button>
</div> </div>
</div> </div>
</section> </section>
......
<p>drinks works!</p>
<div class="drink-card">
<div class="card-img">
</div>
</div>
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-drinks',
templateUrl: './drinks.component.html',
styleUrls: ['./drinks.component.css']
})
export class DrinksComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
...@@ -5,7 +5,6 @@ import { Observable } from 'rxjs'; ...@@ -5,7 +5,6 @@ import { Observable } from 'rxjs';
import { State } from '../../store'; import { State } from '../../store';
import { Logout } from '../../store/actions/auth.actions'; import { Logout } from '../../store/actions/auth.actions';
import { isLoggedInAuthSelector } from '../../store/selectors/auth.selectors'; import { isLoggedInAuthSelector } from '../../store/selectors/auth.selectors';
import { FetchPhotos, SetFilter } from 'src/app/photos/shared/store/photos.actions';
@Component({ @Component({
selector: 'app-topbar', selector: 'app-topbar',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment