File

app/core/services/expand-service/expand.service.ts

Description

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.

Index

Properties
Methods

Constructor

constructor()

Methods

openAccordion
openAccordion(id: string)
Parameters :
Name Type Optional
id string No
Returns : void

Properties

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);
	}
}

result-matching ""

    No results matching ""