getEmployee()
is a method in my service page and now I want employee list without subscribe showEmployee()
method in my component using HTML template.
showEmployee(){
this.employeeModel= this._empService.getEmployee();
}
employeeModel : Observable<any>
or If It as List
employeeModel : Observable<any[]>=[];
showEmployee(){
this.employeeModel= this._empService.getEmployee();
}
In Html if You have List Type Then
<div *ngFor="let data as employeeModel | async">
.... code for show data Like {{data.property Name }}
</div>
If Its an Object
<div> {{employeeModel | async}}</div>