1 import { Component, ElementRef, ViewChild } from '@angular/core'
2 import { Notifier, UserService } from '@app/core'
3 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
6 selector: 'my-welcome-modal',
7 templateUrl: './welcome-modal.component.html',
8 styleUrls: [ './welcome-modal.component.scss' ]
10 export class WelcomeModalComponent {
11 @ViewChild('modal', { static: true }) modal: ElementRef
14 private userService: UserService,
15 private modalService: NgbModal,
16 private notifier: Notifier
20 this.modalService.open(this.modal, {
29 this.userService.updateMyProfile({ noWelcomeModal: true })
31 () => console.log('We will not open the welcome modal again.'),
33 err => this.notifier.error(err.message)