Last active
September 28, 2020 12:07
-
-
Save BMU-Verlag/9614e5b61dbcd9f417f9a5969fc9b20f to your computer and use it in GitHub Desktop.
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 } from '@angular/core'; | |
@Component({ | |
selector: 'app-counter', | |
templateUrl: './counter.component.html', | |
styleUrls: ['./counter.component.scss'] | |
}) | |
export class CounterComponent implements OnInit { | |
public counter = 0; | |
constructor() { } | |
ngOnInit(): void { } | |
public increment(): void { | |
this.counter += 1; | |
} | |
public decrement(): void { | |
this.counter -= 1; | |
} | |
public clearCounter(): void { | |
this.counter = 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment