Last active
January 13, 2021 20:38
-
-
Save bbachi/f7f8fb99c3f83ace1a728904556d7b91 to your computer and use it in GitHub Desktop.
Getting Started
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
<div class="display-board"> | |
<h4>Users Created</h4> | |
<div class="number"> | |
{{userCount}} | |
</div> | |
<div class="btn"> | |
<button class="btn btn-warning" (click)="getAllUsers()">Get All Users</button> | |
</div> | |
</div> |
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
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; | |
@Component({ | |
selector: 'app-display-board', | |
templateUrl: './display-board.component.html', | |
styleUrls: ['./display-board.component.css'] | |
}) | |
export class DisplayBoardComponent implements OnInit { | |
constructor() { } | |
@Input() userCount = 0; | |
@Output() getUsersEvent = new EventEmitter(); | |
ngOnInit(): void { | |
} | |
getAllUsers() { | |
this.getUsersEvent.emit('get all users'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment