Created
January 14, 2018 05:03
-
-
Save shangyilim/45917628392454c60ca53934093115b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Subscribe to the latest stream that contains both | |
// California and Colorado. | |
californiaOrColorado$.subscribe((result) => { | |
// Output to UI. | |
var citiesEle = document.getElementById('cities'); | |
result.forEach(city => { | |
var itemEle = document.createElement("li"); | |
itemEle.textContent = city.name; | |
citiesEle.appendChild(itemEle); | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment