aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/services/modal.service.ts
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-04-06 15:15:47 -0400
committersowgro <tpoke.ferrari@gmail.com>2025-04-06 15:15:47 -0400
commit9f14b3787a8cfc49fd168b1242adcc6d5fa8bfd6 (patch)
tree8af111a538a8d6361e1cf07467b9c31568284921 /ufund-ui/src/app/services/modal.service.ts
parent1ac878b4aaa19ab889c7a98b7dab6acd57c778b3 (diff)
parent04cb51b2e7891785c956c5faa73fb88cc04e82e0 (diff)
downloadJellySolutions-9f14b3787a8cfc49fd168b1242adcc6d5fa8bfd6.tar.gz
JellySolutions-9f14b3787a8cfc49fd168b1242adcc6d5fa8bfd6.tar.bz2
JellySolutions-9f14b3787a8cfc49fd168b1242adcc6d5fa8bfd6.zip
Merge branch 'main' into light-mode
# Conflicts: # ufund-ui/src/app/app.component.html # ufund-ui/src/app/components/funding-basket/funding-basket.component.html # ufund-ui/src/app/components/need-list/need-list.component.html # ufund-ui/src/app/components/need-page/need-page.component.css
Diffstat (limited to 'ufund-ui/src/app/services/modal.service.ts')
-rw-r--r--ufund-ui/src/app/services/modal.service.ts25
1 files changed, 25 insertions, 0 deletions
diff --git a/ufund-ui/src/app/services/modal.service.ts b/ufund-ui/src/app/services/modal.service.ts
new file mode 100644
index 0000000..04f2f3a
--- /dev/null
+++ b/ufund-ui/src/app/services/modal.service.ts
@@ -0,0 +1,25 @@
+import {Injectable, TemplateRef} from '@angular/core';
+import {BehaviorSubject} from 'rxjs';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class ModalService {
+
+ private modal = new BehaviorSubject<TemplateRef<any> | null>(null)
+
+ constructor() {}
+
+ showModal(template: TemplateRef<any>) {
+ console.log("got here", template)
+ this.modal.next(template)
+ }
+
+ hideModal() {
+ this.modal.next(null)
+ }
+
+ getModalBehaviorSubject() {
+ return this.modal;
+ }
+}