Component for displaying a poll modal, allowing users to create, vote, and end polls within a session.

app-poll-modal

true

./poll-modal.component.html

['./poll-modal.component.css']

[CommonModule, FontAwesomeModule, FormsModule]

<app-poll-modal
[isPollModalVisible]="true"
[onClose]="closeModalFunction"
[member]="currentMember"
[islevel]="'2'"
[polls]="pollList"
[poll]="selectedPoll"
[socket]="socketInstance"
[roomName]="'exampleRoom'"
[handleCreatePoll]="createPollFunction"
[handleEndPoll]="endPollFunction"
[handleVotePoll]="votePollFunction"
></app-poll-modal>

Implements

  • OnInit
  • OnChanges

Accessors

  • get modalContainerStyle(): {
        position: string;
        top: number;
        left: number;
        width: string;
        height: string;
        backgroundColor: string;
        display: string;
        zIndex: number;
    }
  • Returns {
        position: string;
        top: number;
        left: number;
        width: string;
        height: string;
        backgroundColor: string;
        display: string;
        zIndex: number;
    }

    • position: string
    • top: number
    • left: number
    • width: string
    • height: string
    • backgroundColor: string
    • display: string
    • zIndex: number
  • get modalContentStyle(): {
        position: string;
        backgroundColor: string;
        borderRadius: string;
        padding: string;
        width: string;
        maxHeight: string;
        overflowY: string;
        top: string;
        bottom: string;
        left: string;
        right: string;
    }
  • Returns {
        position: string;
        backgroundColor: string;
        borderRadius: string;
        padding: string;
        width: string;
        maxHeight: string;
        overflowY: string;
        top: string;
        bottom: string;
        left: string;
        right: string;
    }

    • position: string
    • backgroundColor: string
    • borderRadius: string
    • padding: string
    • width: string
    • maxHeight: string
    • overflowY: string
    • top: string
    • bottom: string
    • left: string
    • right: string

Constructors

Methods

  • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

    Returns void

  • A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.

    Parameters

    • changes: SimpleChanges

      The changed properties.

    Returns void

Properties

isPollModalVisible: boolean = false
onClose: (() => void)
position: string = 'topRight'
backgroundColor: string = '#f5f5f5'
member: string = ''
islevel: string = ''
polls: Poll[] = []
poll: null | Poll = null
socket: Socket<DefaultEventsMap, DefaultEventsMap> = ...
roomName: string = ''
showAlert: ShowAlert = ...
updateIsPollModalVisible: ((isVisible: boolean) => void) = ...
handleCreatePoll: HandleCreatePollType
handleEndPoll: HandleEndPollType
handleVotePoll: HandleVotePollType
faTimes: IconDefinition = faTimes
newPoll: any = ...
screenWidth: number = window.innerWidth
modalWidth: number = ...