optimized api calls by moving api call to individual components and improved performance
This commit is contained in:
@@ -16,6 +16,14 @@ export class BlogComponent extends BaseComponent<IBlog> implements OnInit{
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.init();
|
||||
// this.init();
|
||||
this.getBlog();
|
||||
}
|
||||
|
||||
getBlog(){
|
||||
this.svc.getBlog(this.candidateId).subscribe((response: IBlog) => {
|
||||
this.svc.blog = this.svc.blog ?? response;
|
||||
this.assignData(response);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user