app/core/services/expand-service/expand.service.ts
This service is used for sending accordion ID's used by Body Text Expandable. When clicking on an anchor link on a RTF field it will expand the accordion before scrolling to it.
Properties |
Methods |
constructor()
|
openAccordion | ||||||
openAccordion(id: string)
|
||||||
Parameters :
Returns :
void
|
expandObs |
Default value : this.expandSubject.asObservable()
|
expandSubject |
Default value : new Subject<string>()
|
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
/** This service is used for sending accordion ID's used by Body Text Expandable.
* When clicking on an anchor link on a RTF field it will expand the accordion
* before scrolling to it.
*/
@Injectable()
export class ExpandService {
expandSubject = new Subject<string>();
expandObs = this.expandSubject.asObservable();
constructor() {}
openAccordion(id: string) {
this.expandSubject.next(id);
}
}