Skip to content

Latest commit

 

History

History
72 lines (54 loc) · 2.16 KB

README.md

File metadata and controls

72 lines (54 loc) · 2.16 KB

Angular4-FAQapp

A simple form application developed in Angular 4 to add Question and answer pairs. We can toggle as well as delete the questions Questions and answers will be pushed to or stored to localStorage. These FAqs will be available through a service and therefore, questions will stay in the application even if we refresh the page, or leave the page and come back. The answers to questions will be hidden by default and with the help of Show button, user can see the answer. If he wants to remove the FAQ he can make use of Remove button


The application is deployed on Heroku. https://faq-angular-app.herokuapp.com/

Screenshots


localStoage data


Important aspects in this project => Nested Component [Nesting of Question component inside Question-list component]
Bootstrap the project
npm install bootstrap@4.0.0-alpha.6 jquery tether --save

Include the bootstrap path in "styles" and jquery, tether, bootstrap javascript file path in "scripts" in angular-cli.json


Components

  1. Navbar
ng g component components/navbar

2. Questionlist
ng g component components/questionList
  1. Question
ng g component components/question

Pass the question into single question-list component => Adding the input to the component using @Input()



Generate Component which will be a form to add a question and answer. Output the data into the question list i.e Set the output for the question you add => Emitting output from the component using @Output

ng g component components/addQuestion

Service

ng g service services/data

localStorage is implemented in the service so that these questions are stored to client machine.