Last change
on this file was baf4cc4, checked in by ppaunovski <paunovskipavel@…>, 3 months ago |
split group project and individual project into two separate folders
|
-
Property mode
set to
100644
|
File size:
898 bytes
|
Line | |
---|
1 | import {Component, OnInit} from '@angular/core';
|
---|
2 | import {TicketService} from "../../services/ticket/ticket.service";
|
---|
3 | import {TicketResponse} from "../../model/responses/TicketResponse";
|
---|
4 | import {TicketComponent} from "../ticket/ticket.component";
|
---|
5 | import {RouterLink} from "@angular/router";
|
---|
6 | import {MatButton, MatButtonModule} from "@angular/material/button";
|
---|
7 |
|
---|
8 | @Component({
|
---|
9 | selector: 'app-tickets-page',
|
---|
10 | standalone: true,
|
---|
11 | imports: [
|
---|
12 | TicketComponent,
|
---|
13 | RouterLink,
|
---|
14 | MatButtonModule
|
---|
15 | ],
|
---|
16 | templateUrl: './tickets-page.component.html',
|
---|
17 | })
|
---|
18 | export class TicketsPageComponent implements OnInit{
|
---|
19 |
|
---|
20 | tickets: TicketResponse[] = []
|
---|
21 |
|
---|
22 | constructor(private service: TicketService) {
|
---|
23 | }
|
---|
24 |
|
---|
25 | ngOnInit(): void {
|
---|
26 | this.service.getTickets().subscribe({
|
---|
27 | next: response => {
|
---|
28 | console.log(response);
|
---|
29 | this.tickets = response
|
---|
30 | }
|
---|
31 | })
|
---|
32 | }
|
---|
33 |
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.