Skip to Content
Practical Web Design
book

Practical Web Design

by Philippe Hong
April 2018
Beginner content levelBeginner
368 pages
7h 37m
English
Packt Publishing
Content preview from Practical Web Design

Components

The first component we will create is the main weather component. We need the following three properties attached to it: 

  • Data
  • Methods
  • Template

The data array will need the data points of the following components:

  • weatherLocation: This will store the location entered in the input
  • weatherApi: This is your open weather API key http://openweathermap.org/appid
  • weather: We will store the results of the API in this component
  • displayWeather: We will set a value of true or false (Boolean) if we want to display the data

To make a call to the OpenWeather API, we will use Vue resource method for .get(). The results of this method will be stored in the weather data point and then set the displayWeather data point to true

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Web Design Playground

Web Design Playground

Paul McFedries
Hello Web Design

Hello Web Design

Tracy Osborn
The Principles of Beautiful Web Design, 4th Edition

The Principles of Beautiful Web Design, 4th Edition

Jason Beaird, Alex Walker, James George

Publisher Resources

ISBN: 9781788395038Supplemental Content