ICP 2 - Hiresh12/CS5551_Team6_1_17_ICP_1 GitHub Wiki
Team Details
Team-6
- Hiresh Jakkala Bhaskar(class id - 17)
- Bharath Kumar Eilane(class id - 12)
Objective
To create a web page that should have two text fields to get state code and city name as inputs and pass that input through API call and get weather update like temperature and condition as response and display it in the web page.
Input
Input has been taken through two text fields as state code and city name. Example : State code - MO City - Kansas city
Output
Output has temperature and weather condition of a particular city for next 5 hours.
Code Explanation
UI
UI code has been developed using HTML and Bootstrap framework.
HTML text elements are used to get inputs and aligned in table structure.
HTML table element is used to show the output.
API Call
Angular Http call is implemented which will send request to the server and gets a response from the server. AngularJS ng-model is used to bind the input values to the variables and will be send along with request URL.
Output
Used Angular ng-repeat directive to display output data in table.
UI Validation
Validation is implemented to alert user if State or city textbox is left blank.
Error Handling
Exceptions are handled if city or state is given incorrectly.
Conclusion
Finally web page has been created to display weather conditions of a city with the help of Angular http call. In this project, I have learnt few AngularJS concepts and how to use them.
References
Learnt AngularJS from https://www.w3schools.com/angular API Reference - http://api.wunderground.com/api/4bbbc25f4f5946dd/hourly/q/state%20code/cityname.json