mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-13 22:33:03 -05:00
feat(challenge34): default vs onpush perfoamnce serie
This commit is contained in:
13
apps/performance/default-onpush/src/app/random.component.ts
Normal file
13
apps/performance/default-onpush/src/app/random.component.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Component } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'app-random',
|
||||
standalone: true,
|
||||
template: `I do nothing but I'm here: {{ count() }}`,
|
||||
})
|
||||
export class RandomComponent {
|
||||
counter = 0;
|
||||
|
||||
count() {
|
||||
return this.counter++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user