import { Component , OnDestroy , OnInit } from '@angular/core' ; import { Subscription } from 'rxjs' ; import { UserService } from '@core/services/user.service' ; import { UserModel } from '@shared/models/user.model' ; /**
 * Users list component
 */ @ Component ( { selector : 'dashboard-users-list' , templateUrl : './users-list.component.html' , styleUrls : [ './users-list.component.scss' ] , } ) export class UsersListComponent implements OnInit , OnDestroy { public activeuserTable : string [ ] = [ 'avatar' , 'name' , 'creationTime' , 'lastSignInTime' ] ; public userSubscription : Subscription ; public users : UserModel [ ] ; param userService constructor ( private userService ) { } /**
     * Life cycle init method
     */ ngOnInit ( ) { this . userSubscription = this . userService . findAllUserList ( ) . subscribe ( ( users ) => this . users = users ) ; } /**
     * Lifecycle destroy method
     */ ngOnDestroy ( ) { this . userSubscription . unsubscribe ( ) ; } }