Skip to content

Instantly share code, notes, and snippets.

@dixitayush5085
Created October 27, 2022 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dixitayush5085/a56fa58c3d9a9ecaa43d676e94abfbec to your computer and use it in GitHub Desktop.
Save dixitayush5085/a56fa58c3d9a9ecaa43d676e94abfbec to your computer and use it in GitHub Desktop.
import { Component, EventEmitter, Input, Output } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
@Input('noOfStars') public noOfStars: number = 5;
@Output('feedback') feedback = new EventEmitter;
title = 'my-first-microfrontend-app';
noSelectedStars: number = 0;
updateFeedbackResponse(index: number) {
index++;
this.noSelectedStars = index;
}
submitFeedback() {
this.feedback.emit({
noOfStars: this.noOfStars
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment