Created
December 15, 2018 14:36
-
-
Save astr0sl0th/21740f6a5d1b111a52e5bed20f2f9db4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit, Input } from '@angular/core'; | |
| import { ModalService } from './modal/modal.service'; | |
| import { BehaviorSubject } from 'rxjs'; | |
| @Component({ | |
| selector: 'app-modal', | |
| templateUrl: './modal.component.html', | |
| styleUrls: ['./modal.component.css'] | |
| }) | |
| export class ModalComponent implements OnInit { | |
| @Input() title: string; | |
| @Input() subHeading: string; | |
| @Input() className: string; | |
| @Input() modalName: string; | |
| toggleModal: BehaviorSubject<string>; | |
| constructor(private modalService: ModalService) {} | |
| ngOnInit() { | |
| this.toggleModal = this.modalService.toggalModal; | |
| } | |
| closeModal() { | |
| this.modalService.toggalModal.next('none') | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment