udacity / ud811 Goto Github PK
View Code? Open in Web Editor NEWCourse materials for Udacity's Intro to Progressive Web Apps course at https://www.udacity.com/course/intro-to-progressive-web-apps--ud811
License: MIT License
Course materials for Udacity's Intro to Progressive Web Apps course at https://www.udacity.com/course/intro-to-progressive-web-apps--ud811
License: MIT License
Hi ,
I am learning Udacity course : https://in.udacity.com/course/intro-to-progressive-web-apps--ud811.
In lession 1 , I cloned this repo & when I started code folder { 1- 12- skeleton } from chrome web server . I am not able to view same page as shown in course , blank page with spinner. Instead I get Add your CIty .
Kindly let me know how to get loading spinner page.
If you're having trouble setting up a proxy server because the firebase API doesn't work, here's another solution (you need chrome to make this work).
app.getForecast
function in your app.js file as follows, inserting your API key from step 2:app.getForecast = function(key, label) {
var cityToLatLon = {
'austin': '30.3079823,-97.8938293',
'boston': '42.313479,-71.1273685',
'chicago': '41.8339032,-87.8725822',
'bangalore': '12.9539598,77.4905096',
'buenosaires': '-34.6158036,-58.5035321',
'capetown': '-33.9137107,18.0942365',
'london': '51.5285578,-0.2420244',
'mcmurdo': '-77.8401137,166.6441437',
'newyork': '40.7128,-74.0059',
'portland': '45.5425909,-122.7948484',
'sanfrancisco': '37.7578149,-122.5078116',
'seattle': '47.6149938,-122.4763319',
'sydney': '-33.7966053,150.6415579',
'tokyo': '35.6732615,139.5699601'
};
var cityCoords = cityToLatLon[key];
var url = 'https://api.forecast.io/forecast/INSERT_YOUR_API_KEY_HERE/' + cityCoords;
// Make the XHR to get the data, then update the card
var request = new XMLHttpRequest();
request.onreadystatechange = function() {
if (request.readyState === XMLHttpRequest.DONE) {
if (request.status === 200) {
var response = JSON.parse(request.response);
response.key = key;
response.label = label;
app.updateForecastCard(response);
}
}
};
request.open('GET', url);
request.send();
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.