sidebar candidate info not loading even after service is up

This commit is contained in:
Bangara Raju Kottedi 2024-05-02 00:27:52 +05:30
parent 26e7bd5d44
commit 3e80780fce
3 changed files with 8 additions and 0 deletions

View File

@ -12,5 +12,8 @@ export abstract class BaseComponent<T extends object> {
assignData(response: Partial<ICv> | unknown){
Object.assign(this.model, response);
if(this.svc.candidateAndSocialLinks == null){
this.svc.getCandidateInfoSubject.next("");
}
}
}

View File

@ -16,6 +16,9 @@ export class ContactSidebarComponent extends BaseComponent<ISideBar> implements
}
ngOnInit(): void {
this.svc.getCandidateInfoSubject.subscribe(() => {
this.getCandidateAndSocialLinks();
});
this.getCandidateAndSocialLinks();
}

View File

@ -13,6 +13,8 @@ import { IContact } from '../contact/contact.model';
providedIn: 'root'
})
export class CvService {
public getCandidateInfoSubject = new Subject();
public cv!: ICv;
public about!: IAbout;