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