projects/k-components/src/lib/services/radiobuttonsnames.service.ts
Properties |
Methods |
|
constructor()
|
Public getNewName |
getNewName()
|
Returns :
string
|
Static counter |
Type : number
|
Default value : 0
|
id |
Type : string
|
Default value : ''
|
Public sync |
Type : EventEmitter<any>
|
Default value : new EventEmitter<any>()
|
import { Injectable, EventEmitter } from '@angular/core';
@Injectable()
export class RadioNameService {
static counter: number = 0;
id = '';
public sync: EventEmitter<any> = new EventEmitter<any>();
constructor() {
this.id = `radioButtonGroup${++RadioNameService.counter}`;
}
public getNewName() {
return this.id;
}
}