mirror of
https://github.com/lainbo/component-party.git
synced 2026-04-05 13:09:03 +08:00
17 lines
399 B
TypeScript
17 lines
399 B
TypeScript
import { Component } from '@angular/core';
|
|
import { Observable } from 'rxjs';
|
|
import { User } from './user';
|
|
import { UserService } from './user.service';
|
|
|
|
@Component({
|
|
selector: 'app-users',
|
|
templateUrl: './users.component.html'
|
|
})
|
|
export class UsersComponent {
|
|
users$: Observable<User[]>
|
|
|
|
constructor(public userService: UserService) {
|
|
this.users$ = this.userService.getUsers();
|
|
}
|
|
}
|