-
Notifications
You must be signed in to change notification settings - Fork 3
View Question
The view-question component acts as the parent component to the Question Component and the Response Component. It displays the question component, the number of responses, and then a response component for each response attached to the question. For experts viewing the page, it also features the enter-response component.
Each Question Component and Response Component is instantiated for each individual question and response retrieved from the server. The selected question and relevant responses are populated within the View Question Component via the Question Service, which utilizes a setter function to set the question ID within the Preview Question Component, and then employs a getter function to supply the selected question within our Question Component and Response Component.
Help! These component names are confusing!
In this project there are several components just related to posted questions, all in the static module. We start with the question-list, which is a list of preview-question components. This is a list of questions for users to browse through for reading/answering. When one of these preview-question components is clicked, it routes the user to a view-question component built using that question. This view-question component itself contains a question component for the actual question, in addition to responses and other content. In summation:
- question-list : a list of preview-question components
- preview-question : a limited preview that links to view-question
- view-question : a full view of a question and associated responses
- question : the component that represents the question itself in the view-question component *_ask-question: where user submits a question *_ask-question: component where user submits a question