Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag

BMU-Verlag/angular_1_4.ts

Last active Sep 28, 2020
Embed
What would you like to do?
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
You can’t perform that action at this time.