src/lib/services/contact-factory.service.ts
Methods |
constructor(logService: LogService)
|
||||||
Parameters :
|
createContact |
createContact(jidPlain: string, name?: string, avatar?: string)
|
Returns :
any
|
import { Injectable } from '@angular/core';
import { Contact } from '../core/contact';
import { LogService } from './log.service';
@Injectable()
export class ContactFactoryService {
constructor(private logService: LogService) { }
createContact(jidPlain: string,
name?: string,
avatar?: string) {
if (!name) {
name = jidPlain;
}
return new Contact(jidPlain, name, this.logService, avatar);
}
}