From 996674410a07b98717a8420b4b723ce52d08d381 Mon Sep 17 00:00:00 2001 From: Julian Tomczyk Date: Mon, 10 Jan 2022 15:45:09 +0100 Subject: [PATCH] ajout event emitter dans avis-bar --- src/app/components/avis-bar/avis-bar.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/components/avis-bar/avis-bar.component.ts b/src/app/components/avis-bar/avis-bar.component.ts index 6b238c3..b0ca984 100644 --- a/src/app/components/avis-bar/avis-bar.component.ts +++ b/src/app/components/avis-bar/avis-bar.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, EventEmitter, OnInit, Output } from '@angular/core'; @Component({ selector: 'app-avis-bar', @@ -7,6 +7,7 @@ import { Component, OnInit } from '@angular/core'; }) export class AvisBarComponent implements OnInit { starStates: {stateSelectedUser : boolean, stateHoverUser : boolean}[]; + @Output() stateNumber = new EventEmitter starStateNumber: number = 0; constructor() { @@ -61,6 +62,7 @@ export class AvisBarComponent implements OnInit { } } //console.log(`Rating : ${this.starStateNumber}`); + this.stateNumber.emit(this.starStateNumber); } }