Angular - Custom method decorator which triggers console.log() at the beginning and end of a method
问题 I would like to know if it is possible to create a custom decorator in Angular which when applied to a method can achieve the following functionality: console log at the beginning of a method console log at the end of a method Example: Without Decorator: getRelationshipSource() { console.log('Entering getRelationshipSource method'); this.referenceDataService.getRefData('RLNSHPSC').subscribe(res => { this.relationshipSource$.next(res); }); console.log('Leaving getRelationshipSource method'); }