Last change
on this file since e29cc2e was e29cc2e, checked in by Ema <ema_spirova@…>, 3 years ago |
primeNG components
|
-
Property mode
set to
100644
|
File size:
941 bytes
|
Rev | Line | |
---|
[ceaed42] | 1 | import { Component, OnInit } from '@angular/core';
|
---|
| 2 | import { ActivatedRoute } from '@angular/router';
|
---|
| 3 | import { Planner } from 'src/app/_models/planner';
|
---|
| 4 | import { PlannerService } from 'src/app/_services/planner.service';
|
---|
[e29cc2e] | 5 | import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
---|
| 6 |
|
---|
| 7 |
|
---|
| 8 |
|
---|
[ceaed42] | 9 |
|
---|
| 10 | @Component({
|
---|
| 11 | selector: 'app-add-location-to-planner-panel',
|
---|
| 12 | templateUrl: './add-location-to-planner-panel.component.html',
|
---|
| 13 | styleUrls: ['./add-location-to-planner-panel.component.css']
|
---|
| 14 | })
|
---|
| 15 | export class AddLocationToPlannerPanelComponent implements OnInit {
|
---|
| 16 |
|
---|
| 17 | planners: Planner[];
|
---|
[59329aa] | 18 |
|
---|
[ceaed42] | 19 |
|
---|
[e29cc2e] | 20 |
|
---|
| 21 | constructor(private plannerService: PlannerService,
|
---|
| 22 | private route: ActivatedRoute, private ref: DynamicDialogRef) {
|
---|
[ceaed42] | 23 | this.planners = [];
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | ngOnInit(): void {
|
---|
[e29cc2e] | 27 |
|
---|
[ceaed42] | 28 | this.plannerService.getAllPlanners().subscribe(
|
---|
[e29cc2e] | 29 | planner => {
|
---|
| 30 | this.planners = planner;
|
---|
[ceaed42] | 31 | }
|
---|
| 32 | );
|
---|
| 33 | }
|
---|
| 34 |
|
---|
[e29cc2e] | 35 | selectPlanner(planner: Planner) {
|
---|
| 36 | this.ref.close(planner);
|
---|
[ceaed42] | 37 | }
|
---|
| 38 |
|
---|
[59329aa] | 39 |
|
---|
[ceaed42] | 40 |
|
---|
| 41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.